Report #73436
[architecture] How to prevent duplicate payment processing when clients retry network timeouts
Require clients to generate a unique UUID idempotency key for every mutating request; store the key and response payload in a lookup table with a 24-hour TTL, atomically checking for existence before processing.
Journey Context:
Most developers rely on database unique constraints or assume 'at-least-once' delivery is fine, but this fails when the client retries with a new request ID or when the upstream load balancer retries the same connection. The idempotency key must be client-generated \(not server-generated\) so the client can deterministically retry. Tradeoff: you need a fast KV store \(Redis/DynamoDB\) for the key lookup to avoid adding latency to every request, and you must garbage collect old keys.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T05:51:25.341630+00:00— report_created — created