What a Payment Actually Is
A payment crosses five organizations, four networks, and three time horizons that differ by seven orders of magnitude — and not one pair of them can take a lock together. This guide is about the mechanisms that produce a single charge anyway: the idempotency key and what it actually protects, the state machine that survives a lost response, the two-phase charge that keeps the irreversible step for last, and the six other ways you can still double-charge a customer with every one of them in place.
The Four Parties
A card payment has four participants, and Stripe is only one of them — and not the one you'd guess:
| Cardholder | Your customer. Owns the payment method. |
|---|---|
| Issuer | The cardholder's bank. The only party that decides approve/decline. |
| Network | Visa / Mastercard. A message switch + rulebook, not a bank. |
| Acquirer | Stripe. Submits your transactions, receives settlement, pays you out. |
Stripe's own role is easy to misname. Stripe is a payment facilitator — it aggregates many merchants under its own merchant identification numbers with underlying acquiring-bank partners, which is why you can take a card payment without ever opening a merchant account with a bank yourself. Stripe is not the issuer, has no visibility into the cardholder's balance, and does not make the approve/decline call. The card network is the least understood piece: Visa and Mastercard don't hold cardholder funds or extend credit — they route authorization messages between acquirer and issuer in milliseconds, and separately they publish the rulebook (interchange rates, dispute windows, liability shift rules) that every other party in the diagram below has to follow whether they like it or not.
The Timeline Mismatch
The API call above resolves in the time it takes to load a webpage. Nothing else in the diagram moves on that timescale, and that seven-order-of-magnitude spread — milliseconds to months — is the fact this whole guide is organized around:
| API response | ~hundreds of ms |
|---|---|
| Auth hold validity | 2–7 days, network- and channel-dependent |
| Clearing | Nightly batch, not per-transaction |
| Settlement | T+1 to T+2 to the acquirer |
| Merchant payout | Stripe default: ~T+2 rolling, US |
| Dispute window | Up to ~120 days (network rules vary) |
Card-not-present authorization holds are not indefinite: Visa's window is roughly 5 days, Mastercard/Amex/Discover roughly 7 days for a customer-initiated online transaction, shorter (as little as 2 days on some networks) for card-present terminal transactions — Stripe exposes the exact expiry as payment_method_details.card.capture_before on the charge. Miss it and the hold releases; the PaymentIntent moves to canceled, and you have to re-authorize, which means asking the issuer again and risking a fresh decline (see Authorize vs capture covers capture mechanics in full). Clearing is a batch process, not a per-transaction event — your terminal or API doesn't "clear" a charge the instant it captures, it adds the charge to a batch that the network processes overnight. Settlement — the acquirer actually receiving funds from the issuer, net of interchange — lands T+1 to T+2 after that. Stripe's own payout to your bank account is a separate schedule layered on top (commonly a ~2-business-day rolling default for established US accounts), so "the customer paid" and "the money is in your bank" can be three to four days apart even when nothing goes wrong. And a dispute can undo all of it up to roughly 120 days after the transaction under Visa/Mastercard/Amex/Discover rules — the exact window and the merchant's response deadline both vary by network, so treat "up to 120 days" as an order of magnitude, not a guarantee you can hardcode.
The Vocabulary You Need Before PaymentIntent state machine and Authorize vs capture
| Authorize | Issuer places a hold. No funds move. |
|---|---|
| Capture | Merchant claims the held amount. Starts clearing. |
| Clear | Batch reconciliation between acquirer and issuer. |
| Settle | Funds actually credited to the acquirer, net of fees. |
The PaymentIntent state machine part covers the full PaymentIntent state machine and the Authorize vs capture part covers authorize-vs-capture mechanics in depth. Here you only need to know these are four different events, on four different clocks, and that only "authorize" happens inside your ~300ms API call.
Why Every Payment API Is a Distributed-Systems Problem
None of the four parties in the diagram above will ever share a database, a lock manager, or a transaction coordinator with any other. There is no BEGIN; UPDATE issuer_ledger; UPDATE your_orders_table; COMMIT; — the issuer's core banking system and your Postgres instance have never heard of each other and never will. That single fact is the spine of this guide: a payment is a distributed transaction across parties that will never share a transaction manager, so every guarantee downstream is bought by making one specific step replayable and pushing the irreversible step as late as possible.
There is no lock you can take across the issuer and your database. Every "guarantee" described in this guide — an idempotent retry, a webhook that eventually arrives, a reconciliation job that closes the gap — is a substitute for the cross-system transaction that flatly does not exist.
Concretely, imagine trying to build the cross-system lock anyway, and watch where it breaks:
- Take a lock on the order row before contacting the issuer. Fine so far — that's a normal local
SELECT ... FOR UPDATE. But it protects nothing outside your own database. - Ask the issuer to "prepare" the debit without committing it. There is no such API. Card-network messaging has exactly one round trip for authorization — approve-or-decline — with no vote-then-commit phase for you to participate in.
- Hold your local lock until the issuer's decision comes back. Now your local lock's lifetime is bounded by a network round trip to a system you don't control — a slow issuer, a network partition, or Stripe's own queueing (see Rate limiters and load shedding) turns your local lock into an outage, because the "hold time" is dictated by someone else's SLA, not yours.
- Commit or roll back based on the response. This is the only step that actually works — and notice it needs no lock at all. It's a single local transaction, gated by a foreign response you already received. That's the entire pattern the Idempotency: the machinery part formalizes as "atomic phases."
Everything that follows is a consequence of that constraint, not an independent design choice:
Idempotency (see Idempotency: the contract, Idempotency: the machinery) exists because your client and Stripe's API can disagree about whether a request executed — the connection is the one link in the chain with no other consistency mechanism, so it gets a replay contract instead. Sagas and compensation (see Sagas and compensation) exist because you cannot roll back an authorization that already succeeded at the issuer the way you'd roll back a database transaction — you can only run a new, opposite operation (a refund, a void) and hope it's accepted. Webhooks (see Webhooks) exist because Stripe's state can change for reasons that never touch your request path at all (a dispute opened three months later, an async bank-debit finally clearing) and there is no way to push that into your system except at-least-once delivery over the network. Reconciliation (see Money invariants) exists because "my database says X, Stripe's ledger says Y" is not a bug — it is the expected steady state of two systems with no shared transaction manager, and the only fix is a periodic diff, not a stronger lock.
Who eats the loss when a chargeback lands is itself a rule the network sets, not a Stripe policy: a fraud dispute where the merchant used 3D Secure typically shifts liability to the issuer, while the same dispute without 3D Secure typically lands on the merchant. "Non-fraud" disputes (wrong amount, product not as described, subscription the customer forgot about) follow a different track entirely and are contested on the merits, not on authentication method. See Radar (Radar) and the Money invariants part (the double-charge taxonomy) both build on this distinction — it's why authentication strength is a lever merchants can actually pull to change who bears dispute risk, not just a fraud-prevention nicety.
What "The API Succeeded" Actually Asserts
| Myth | Reality |
|---|---|
"succeeded means I have the money" | It means the issuer promised to pay Stripe, and Stripe will pay you, on Stripe's settlement/payout schedule — T+1/T+2 to Stripe, then another ~2 business days to your bank by default. The funds are not in your account today. |
| "declined means the customer has no money" | Most declines carry no financial information at all. do_not_honor — a generic, undisclosed issuer refusal — is one of the most common decline codes in the industry and can mean anything from a velocity check to a stale card-on-file; it is frequently not actionable, and the identical charge often succeeds on a plain retry. |
"a succeeded PaymentIntent is final" | It is final only in the sense that the issuer's promise was kept once. Refunds, and disputes up to ~120 days out (network rules vary), can still reverse the funds after you've already shipped the order and spent the money. |
| "the network approved my payment" | The network never decides anything — it relayed the issuer's decision. Two different networks routing the same card would relay two different issuers' opinions; the network's only vote is whether the message conforms to its rulebook (valid MID, well-formed fields), not whether the cardholder is good for the money. |
The Invariants
- Guarantees: Every payment event you can observe — API response, webhook, Dashboard row — reflects a promise made by one party to another on that party's own clock; you can always tell where a payment sits on authorize → capture → clear → settle by its status and timestamps.
- Does not guarantee: That a
succeededresponse means funds are in your bank account today; that a decline means the cardholder lacks funds; that a lost or delayed HTTP response tells you whether the underlying operation happened; or that "succeeded" is the last state a PaymentIntent will ever be in.