Stripe's Exactly-Once Payments: Idempotency Keys, Atomic Phases & Ledger Explained
Oct 28, 2026
A customer taps pay. The network drops. Did the charge happen? Did the response get lost? Is the request still in flight? Retry blindly and you may charge twice. Do nothing and you may lose the sale.
This video breaks down the architecture behind safe payment retries: idempotency keys, database constraints, atomic phases, recovery points, and an immutable double-entry ledger. You’ll see how a unique key plus a database lock becomes the arbiter of “exactly once,” how retries resume from a recovery point instead of starting over, and how a ledger turns correctness into arithmetic.
Chapters:
00:00 — The retry problem: three failures look identical
00:33 — The Idempotency-Key contract
00:59 — How Stripe replays the first response
01:17 — One row, one unique constraint, one lock, 409 conflict
01:55 — 24-hour pruning and key/parameter mismatch errors
02:22 — At-least-once transport + idempotent operations
02:47 — Backoff, jitter, and atomic phases
03:18 — Recovery points and the retry DAG
03:56 — Ledger as an immutable system of record
04:27 — Double-entry bookkeeping and the plumbing metaphor
05:13 — Ledger scale and data-quality questions
05:48 — Summary: one key, one row, one lock, one immutable log
Key idea: Idempotency keys make retries safe. Atomic phases make them recoverable. Recovery points make retries intelligent. The ledger makes the result provable.
Show More Show Less 