The payment stack end to end: twelve steps from checkout to settlement

Authorization, clearing, settlement, ledger and chargebacks as one chain — what each step takes in, what it produces, and where it usually breaks.

Payment systems are hard less because any single step is complex, and more because there are many steps — and “done” means something different at each one. A success screen may only mean the instruction was created. A bank accepting a payment may still be clearing it. A completed payout may not have reached the beneficiary.

This is a map of the whole chain: what happens between a customer tapping pay and money landing, what each step takes in and produces, and which states must never be conflated. It does not replace any provider’s documentation, but it works as an index when you split the build into systems and phases.

Why draw the map first

Building one step at a time, without a shared picture, produces mismatched states: the order says paid while the ledger has no entry; the ledger has an entry while the provider later returns the money; a refund is accepted while the customer has received nothing.

These are rarely coding errors. They come from nobody agreeing on which step “settled” actually refers to. The map fixes the steps first, then each step answers only for its own segment.

Twelve steps and their boundaries

The sequence below follows one card payment from checkout to reconciliation. Provider details vary, but the division of responsibility is broadly the same.

Step Input Output Common failure
1 Checkout Amount, currency, order id Payment intent and idempotency key Duplicate submit, amount rewritten client-side
2 Risk and eligibility Intent, user and device signals Allow or block Rules that misfire, no explainable record
3 Method selection Region, card type, provider capability Candidate routes and fallback order Stale capability data
4 Authorization request Encrypted card data Authorization result and code Timeout, unknown outcome
5 3DS challenge Auth result, issuer requirement Verified or failed Customer abandons mid-flow
6 Persist the result Provider response payload Transaction state and evidence Only successes stored, failures lost
7 Capture and clearing Auth record, batch Clearing file and net amount Partial capture, missing batch
8 Settlement and payout Net amount, cycle Bank credit and advice FX and fee mismatch
9 Ledger posting Business event, account mapping Debit and credit entries Unbalanced entries, double posting
10 Reconciliation Provider statement, internal ledger Difference list Unassigned, untraceable differences
11 Refund and reversal Original transaction, reason Refund record and state Window expired, partial refunds mismatched
12 Chargeback and dispute Chargeback notice, evidence Outcome and ledger adjustment Late evidence, incomplete file

Steps 1 to 6 decide whether the money can be collected. Steps 7 to 9 decide where the money is. Steps 10 to 12 decide whether any of it is missing. Those three questions usually belong to different teams, which is exactly why one shared map matters.

Three distinctions that must not collapse

Authorization is not posting. An authorization only places a hold on the issuer’s side; no funds have moved. Money moves at clearing and settlement. Treating an approved authorization as recognized revenue is the most common measurement error in the chain.

Instruction is not arrival. “Payout successful” in your system usually means the instruction was accepted. What the business cares about is the beneficiary bank crediting the account. Cross-border makes this obvious: intermediary fees, receiving-bank review and incomplete beneficiary data can all leave a payment stranded in the middle.

Ledger is not settlement. The ledger records changes in rights and obligations; settlement records actual movement of funds. They occur at different moments, and the gap between them is funds in transit — which has to be visible on its own.

Model states from events, not from screens

Many systems grow states out of screen requirements: a list page needs a label, so a new state appears. The result is states with fuzzy meaning that different teams read differently.

The steadier approach is to define business events first and derive states from them. “Authorization approved” is one event: the issuer agreed. “Funds credited” is a different event, triggered by a settlement advice. Both can coexist for a long time, and the first may never be followed by the second.

A workable state machine must express the unknown. Timeouts, no response and partial success each need their own state instead of being folded into “failed”. Unknown states need a path to resolution, human or automatic; if that path is not modeled early, it will be patched in later under pressure.

Keep evidence for every step

The longer the chain, the less it is enough to store only the final result. Each step should retain the raw request and response, a timestamp, provider and account identifiers, the idempotency key, and the version of the rule that produced the decision.

That evidence only pays off when something breaks. When the customer says the money never arrived, the provider says it succeeded and the ledger has nothing, the raw records of each step are the only thing that resolves it. For how the ledger side should be bounded and evidenced, see designing a double-entry ledger and from business events to ledger entries.

Sequence the build: cut first, complete later

Do not attempt all twelve steps at once. A workable order:

  1. Define the payment intent and idempotency key so resubmission cannot become double charging;
  2. Define the state machine and how unknown states are handled;
  3. Persist authorization results completely, including failures and timeouts;
  4. Add ledger posting so every business event has matching entries;
  5. Only then build reconciliation, refunds and chargeback flows.

Earlier steps determine whether later ones can be investigated at all. Building reconciliation before states and evidence exist turns it into guesswork. For the authorization side, see what to watch in authorization and why a sufficient balance still gets declined; for routing and fallback, how to route without double charging; for handling differences, fraud, disputes and chargebacks.

If you are planning a new collection or payout path, start by writing down the owner and deliverable for each of these steps, then discuss the technology. If it would help to work through it together, tell me about your case.

Article engagement

Comments —

Comments appear after review.

Have a real use case in mind? Let’s talk.