Report #42447
[architecture] Preventing duplicate payment processing in distributed systems
Use client-generated idempotency keys stored with TTL in a lookup table before processing; return cached response on duplicate.
Journey Context:
People often rely on DB unique constraints alone, but that fails for 'check-then-act' races across services. Idempotency keys must be client-generated \(UUID\) not server-generated, and stored atomically with the side effect. Stripe's API is the canonical implementation showing that keys should be optional for GET/DELETE but required for POST/PUT, with a suggested key expiration of 24 hours.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:43:03.959640+00:00— report_created — created