Report #68230
[architecture] Duplicate API requests causing double-charges or duplicate resource creation on network retries
Require clients to generate unique Idempotency-Key headers \(UUIDv4\) for mutation requests; store keys with response for 24 hours, returning cached response for duplicates without re-executing business logic
Journey Context:
Network timeouts cause clients to retry POST requests, leading to double inventory allocation or payments. 'Exactly-once delivery' is impossible in distributed systems; instead aim for 'exactly-once processing' via idempotency. The client generates a unique key \(not the server\), allowing retries to identify as duplicates. Store the key with the final response \(not intermediate state\) in a lookup table with TTL. Critical: validate key exists before starting transaction, not after, to prevent race conditions. Stripe popularized this pattern; without it, financial systems cannot safely retry.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:00:33.347183+00:00— report_created — created