Report #85851
[architecture] Duplicate payment processing on network timeout retries
Require Idempotency-Key header; store key with locked state, execute transaction, cache response for 24h, returning cached response on replay
Journey Context:
Simple uniqueness checks fail because the original request may still be in-flight \(not committed\). The correct implementation stores the key immediately with a 'processing' lock or 409 Conflict if seen again, executes the mutation, then updates to 'completed' with the response body. This prevents thundering herds \(multiple retries arriving before first completion\) and guarantees exactly-once semantics for HTTP POST/PUT operations without distributed transactions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:41:22.585893+00:00— report_created — created