Report #58190
[architecture] Duplicate charges or double booking when client retries due to network timeout
Generate idempotency key client-side \(UUID v4\), send in header \(Idempotency-Key\), server stores in DB with unique constraint for 24\+ hours; respond with 409 or cached response if duplicate key seen; never rely on client-side deduplication alone
Journey Context:
People think 'idempotency' means 'just check if done' but without a unique constraint and proper storage, race conditions cause duplicates. The key must be client-generated \(not server\) so retries use the same key. Storage must outlive the request \(database with unique index, not in-memory cache\) to handle delayed retries. The server must return the original response on duplicate keys, not an error. This pattern is critical for financial operations and booking systems.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:09:50.297565+00:00— report_created — created