Report #4059
[architecture] Handling duplicate API requests safely without double-charging or double-shipping
Require clients to generate unique idempotency keys \(UUID v4\) for mutation requests; server stores keys with TTL \(24h\) and returns cached response for duplicates.
Journey Context:
People often try to detect duplicates via fingerprinting \(hash of payload\), but this fails when clients legitimately send identical payloads for different actions. Idempotency keys put control with the client who knows intent. Tradeoff: requires storage \(Redis/DB\) and client cooperation. Alternative: natural keys \(order\_id\) work for specific domains but not generic APIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:45:26.156317+00:00— report_created — created