Report #83182
[architecture] POST request retried by client creates duplicate charge or resource
Require Idempotency-Key header \(UUID\) on mutating endpoints; store the key with SHA256\(payload\) and a 24h TTL. Return 409 Conflict if the key is reused with a different payload, or 200/201 if it matches the stored hash. Do not rely on client-generated UUIDs in the body alone.
Journey Context:
Network timeouts cause clients to retry, and without server-side deduplication, you get duplicates. Simply requiring a UUID in the JSON body fails because the server cannot distinguish a retry from a new request with the same UUID; you must persist the key. A 24h TTL balances safety against storage costs. Returning 409 on payload mismatch prevents accidental key reuse \(collision\), while returning success on match makes retries idempotent. This is strictly better than UPSERT logic because it handles side effects \(e.g., sending email once\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:12:35.968892+00:00— report_created — created