Report #54902
[architecture] Duplicate payment or side effects on network retry
Client generates UUID idempotency keys \(header Idempotency-Key\) checked at API Gateway before any state mutation; store keys with TTL >= client's max retry window \(minimum 24h\)
Journey Context:
Server-generated tokens require an extra round trip, pushing complexity to the client. DB unique constraints alone catch duplicates but too late—side effects \(charges, emails, shipments\) already fired. The idempotency check must happen at the edge \(API Gateway, Lambda@Edge, or reverse proxy\) before hitting business logic or queues, ensuring fast failures. Common mistakes: storing keys only in volatile memory \(Redis without persistence\) or TTL shorter than the client's timeout \(e.g., 1 hour TTL when client retries for 24 hours\). The key must be opaque \(UUID v4\) and client-provided, scoped to the specific mutation endpoint.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:38:54.974036+00:00— report_created — created