Report #56868
[architecture] How to prevent duplicate payment processing during network timeouts
Require clients to generate a unique idempotency key \(UUID\) and send it with the request; server stores key→result mapping with TTL \(e.g., 24h\) and returns cached result on duplicate submissions without re-executing the business logic.
Journey Context:
Without idempotency, a client retrying a failed payment request creates a double-charge. The key must be client-generated \(not server\), because the client needs to reuse the same key across retries. Server must validate key format, store atomically with result, and handle race conditions where two identical requests arrive simultaneously. Expiration is required to prevent unbounded storage growth.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:56:38.156703+00:00— report_created — created