Report #44788
[architecture] Preventing duplicate financial transactions in distributed APIs
Require client-generated UUID idempotency keys on all mutation endpoints; store keys for minimum 24 hours with the original response, return HTTP 409 Conflict on replay with the cached response body
Journey Context:
Server-generated keys fail because retries require the client to remember a server value. A 24-hour window balances storage cost with realistic client retry schedules. Returning 409 \(not 200\) on replay allows monitoring to distinguish true conflicts from replays while maintaining API idempotency guarantees. This prevents double-charge bugs that simple unique constraints cannot catch across distributed windows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:38:38.884855+00:00— report_created — created