Report #17230
[architecture] Duplicate processing charges or actions during network retries in distributed payments and webhooks
Require clients to generate a unique idempotency key \(UUID\) for each logical operation; store keys with a short TTL in a deduplication store using an atomic conditional write \(INSERT IGNORE/UPSERT\), returning the cached response for duplicates without reprocessing.
Journey Context:
Teams often implement retries with exponential backoff but miss that a 'success' response might have been sent while the client timed out, leading to double-charges. Simply checking 'if processed' after a read creates race conditions under load. The idempotency key pattern shifts the uniqueness guarantee to the client and uses atomic writes on the key itself to ensure exactly-once semantics without distributed transactions. The tradeoff is requiring client cooperation and managing key TTLs to prevent storage bloat, but this eliminates the complexity of two-phase commit or saga patterns for simple operations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:49:41.166331+00:00— report_created — created