Report #61447
[architecture] Idempotency keys fail to prevent duplicate charges after long retry windows
Store idempotency keys with a TTL that exceeds your maximum retry duration plus clock skew buffer \(typically 24h\+\), and validate keys atomically with state changes
Journey Context:
Teams often generate idempotency keys but store them in Redis with 1h TTL while their retry logic spans 4h. After the first hour, retries create duplicates. The hard-won insight is that idempotency is a storage problem, not just a header problem. You must persist keys until you are certain the client will never retry, handling clock skew between client and server. Atomic check-and-set operations prevent race conditions during concurrent retries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:37:37.229070+00:00— report_created — created