System Design · Concept Library · Free article
Financial Reconciliation — Proving Your Ledger Matches the Money That Actually Moved
Your ledger is honest, but it’s only your view of the money — and confirmation messages get dropped. Reconciliation is the scheduled job that diffs your records against the payment provider’s, sorts the mismatches into a few kinds of break, and repairs them, so a charge that never reached you doesn’t leave a customer paying for nothing. From why one ledger isn’t enough through the two-record diff, the break categories, matching, and auto-repair vs the exception queue — intern to principal.
Financial reconciliation is the scheduled job that proves your money records match reality by diffing two independent ledgers — yours and the payment provider’s — and repairing anything that appears in one but not the other. You need it because your ledger is only your view: confirmation messages are best-effort and occasionally dropped, so a customer can be charged by the provider while your side never hears, leaving them paying for nothing with no alert. Reconciliation pulls both records on a schedule, matches them on a shared key, and sorts the leftovers into three kinds of break — charged-at-the-provider-but-not-in-your-ledger, in-your-ledger-but-not-at-the-provider, and matched-but-mismatched (a different amount, status, or fee). Deterministic rules auto-repair the ones they safely can and route the rest to an exception queue where a human works them, each with an owner, an age, and an audited fix. It is the backstop, not the primary path: idempotency and the ledger prevent most errors, and reconciliation catches the few that still slip through — so you can prove every dollar.
Twelve customers paid, and Hatch never heard a thing
The Pro launch is going well. The upgrade is idempotent, the money is recorded in an append-only ledger, a saga refunds anything that fails halfway. Then a thirty-second network blip hits between the payment provider and Hatch, and twelve of the provider’s confirmation messages — the little callbacks that say "this charge went through, go grant Pro" — never arrive. The provider charged all twelve cards. Hatch heard about none of them. Twelve customers are now paying $8 a month and staring at a Free account, and here is the worst part: nothing is on fire. No error was thrown. No dashboard is red. The money is wrong and the system feels completely healthy.
You cannot catch this from inside a single request, because from Hatch’s point of view nothing happened — there is no failed call to retry, no exception to log. The charge exists only in the provider’s records; your side simply has a gap where twelve upgrades should be. The only way to find a gap like that is to compare your records against someone else’s and notice what is missing. That comparison, run on a schedule, is reconciliation.
Your ledger is honest — but it’s only your side of the story
The last page made a strong case that the ledger is your single source of truth for money, and it is — for the money as your system saw it. But your system did not move the money; the payment provider did. Your ledger records what you believe happened: the charges you sent, the results you were told about. The provider has its own ledger of what actually happened on the card networks. On a healthy day the two agree perfectly. The question reconciliation answers is what happens on the day they do not — because two independent systems connected by a best-effort network will, eventually, disagree.
And re-reading your own ledger cannot help, no matter how carefully you built it. Summing your entries a hundred times still tells you only what your entries say; it can never reveal a charge that lives solely in the provider’s records and never reached you. To find that, you have to hold your record and the provider’s record side by side and look for the differences. The ledger made this possible — you cannot diff against a mutable column that forgot its history — but the ledger alone cannot do it. It takes a second record and a comparison.
Reconciliation is a diff: match what lines up, flag what doesn’t
Underneath the fintech vocabulary, reconciliation is a plain and familiar operation: a diff. You take two lists of transactions — your ledger’s entries and the provider’s records for the same period — and you match them up. Every transaction that appears in both, with the same amount and status, is reconciled: it checks out, and you set it aside. What you care about is the leftovers — the transactions that appear in one list but not the other, or that appear in both but disagree. Those are the breaks, and finding them is the entire point of the exercise.
Run the match on a small batch and watch the two records resolve into the ones that agree and the ones that do not:
The interactive version of this example is available when JavaScript loads.
Every break is one of three kinds
When a transaction does not reconcile, the shape of the mismatch tells you what went wrong and what to do about it. There are only three shapes, and naming them turns a scary "the money is wrong" into a small, fixable checklist:
| Break | What it looks like | Usual cause | The repair |
|---|---|---|---|
| At the provider, not in your ledger | The provider charged a card; your ledger has no matching entry | A dropped confirmation, or a charge that succeeded after your side timed out | Record the charge and finish what it was for — grant the Pro the customer paid for |
| In your ledger, not at the provider | Your ledger shows a charge (or refund) the provider has no record of | A charge you thought you sent that never actually landed, or an internally-initiated refund that failed externally | Reverse or void the phantom entry, or re-send the action that never completed |
| Matched, but mismatched | Both sides have the transaction, but the amount, status, or fee differs | A partial capture, a currency-conversion or fee difference, a status that changed on one side only | Investigate and correct to the authoritative side — usually the provider — with a ledger entry |
Almost every real discrepancy is one of these three. A dropped webhook is the first kind — Hatch’s twelve stranded customers. A charge your code fired off but that errored before it reached the provider is the second. A refund that came back $7.90 instead of $8.00 because of a fee is the third. Read a scenario and decide which kind of break it is:
The interactive version of this example is available when JavaScript loads.
What do you match on — and when is a "break" just early?
The diff is only as good as the key you match on. The best key is a shared, unique id that both sides carry — and you already have one: the idempotency key you attached to the charge is exactly the identifier the provider files it under, so a keyed match is precise and unambiguous. When there is no shared id (say you are reconciling a raw bank statement), you fall back to matching on a combination — amount plus timestamp plus a reference — which is fuzzier and occasionally pairs the wrong two transactions, so deterministic key-matching is always worth designing for up front.
This is also why reconciliation is a comparison of periods, not a live lookup. You reconcile yesterday against yesterday once both sides have closed their books for that day, because settlement and reporting lag mean the two records are only comparable after they have both settled. Chasing a match in real time fights the very timing skew that makes a diff meaningful; you let the dust settle, then compare.
A scheduled job, not a request-time check
Reconciliation is a batch job on a clock. The classic shape is nightly: after midnight, pull the provider’s record of the prior day (they publish a report or a settlement file), pull your ledger’s entries for the same day, match them, and write out the breaks. It runs off to the side of the live traffic — nobody is waiting on it during a request — which is exactly right, because it is comparing settled history, not deciding anything in the moment. A customer’s upgrade is never blocked on reconciliation; reconciliation quietly audits it afterward.
How often you run it is a money-at-risk decision. Nightly is the baseline and fine for most things. But the longer a break goes unnoticed, the longer a customer is stranded or a dollar is misplaced, so high-volume or high-stakes systems run reconciliation more frequently — hourly, or continuously against a near-real-time feed of provider events — to shrink the window between a discrepancy happening and someone catching it. The trade is the usual one: more frequent runs catch drift sooner but do more work and fight the timing-window noise harder, since a very recent transaction is more likely to be merely early rather than truly missing.
Auto-repair what’s clear; queue what needs a human
Finding a break is half the job; resolving it is the other half, and the two paths it can take are the heart of a real reconciliation system. Most breaks are unambiguous and safe to fix automatically. A dropped-webhook break where the provider clearly charged $8 for a known upgrade needs exactly one thing: grant the Pro that was paid for and record the charge. You encode that as a deterministic auto-repair rule — when a break matches this shape, apply this fix — and the vast majority of breaks clear themselves without a human ever looking, idempotently.
But some breaks are ambiguous, large, or just weird — a charge in the settlement file for an amount that matches no upgrade, a mismatch you can’t explain, a sum big enough that a wrong auto-fix would be its own incident. Those must not be auto-repaired; they go to an exception queue, where a human investigates. Watch a batch of breaks get sorted into the ones a rule can safely fix and the ones a person has to:
The interactive version of this example is available when JavaScript loads.
The safety net, not the tightrope
It is worth being precise about reconciliation’s role, because leaning on it wrong is a real mistake. Reconciliation is a backstop. It runs after the fact and on a delay, so it is the last line of defense, not the first. The first lines are everything else this chapter built: an idempotency key so a retry never double-charges, an append-only ledger so no charge is ever lost, a saga so a half-finished upgrade refunds itself. Those prevent the errors. Reconciliation catches the handful that still slip past them — the dropped webhook, the timeout that hid a successful charge — because in a distributed system connected by a best-effort network, a few always will.
The numbers that tell you the money is right
- Match rate is the headline. What share of transactions reconcile automatically each run? A healthy system sits near 100%; a dip is your earliest signal that something on the primary path broke.
- Break count by category. How many of each of the three kinds? A spike in one category points at a specific cause — a jump in provider-only breaks says confirmations are being dropped, for instance.
- Unreconciled amount — the money at risk. Not just how many breaks, but how many dollars are currently unaccounted for. This is the number you actually defend; a hundred one-cent breaks matter less than one large one.
- Break aging. How long have open breaks been unresolved? Anything past its threshold is escalated — a stale break is a customer stranded or a dollar lost that nobody has fixed yet.
- Auto-repair rate. What fraction of breaks resolve without a human? Falling auto-repair means new failure shapes your rules don’t cover yet — a prompt to add a rule or investigate.
What it costs, and when you don’t need it
Reconciliation is real, ongoing operational weight: a job to run and monitor, matching rules to maintain as the business grows, and a queue that needs humans to work it. You take that on because the alternative — trusting a single record of money that could be silently wrong — is worse. But that trade only makes sense when there is a genuine second record to reconcile against and a real cost to being wrong. When there isn’t, don’t build it:
Signs you don’t need reconciliation (yet)
- There is no independent second record. Reconciliation is a diff of two sources; if the money never leaves your own system, there is nothing external to diff against — you rely on the ledger’s internal invariant instead.
- The values can’t drift. Two records that are updated by the same transaction in the same system don’t independently diverge; reconciliation earns its keep when independent parties and a lossy network sit between the two.
- The stakes don’t justify the operation. A low-volume, low-value flow may be fine with periodic manual spot-checks rather than a standing automated engine — build the machine when the money and volume warrant it.
- You haven’t fixed the primary path. If errors are frequent, invest there first; reconciliation is the net under a mostly-correct system, not a substitute for building one.
Everyone who moves money runs this
Reconciliation is the quiet backbone of every payments operation. Banks have reconciled ledgers against each other for as long as banking has existed; it is the original two-record diff. Stripe, Adyen, and their peers publish detailed transaction and settlement reports precisely so their customers can reconcile — and provide reporting tools to help. Ledger-and-reconciliation platforms like Modern Treasury and Formance sell this as infrastructure so a fintech does not rebuild the matching engine, the break categories, and the exception workflow from scratch. Marketplaces reconcile three ways across the processor, the bank, and their internal ledger to prove every payout. Different scales, one discipline: hold two independent records of the same money side by side, on a schedule, and resolve every difference — so you can say, and prove, that every dollar is accounted for.
The reconcile job, in shape
The whole engine is a diff keyed on a shared id, three buckets, and a repair step:
The nightly reconcile
- Pull both settled records.
ours = ledger.entriesFor(day)andtheirs = provider.report(day)— only after both have closed the day’s books. - Index by the shared key. Build maps by the idempotency key each transaction carries, so matching is an exact lookup, not a fuzzy guess.
- Diff into three buckets.
providerOnly = theirs − ours(dropped/late),ledgerOnly = ours − theirs(phantom),mismatched = keys in both where amount or status differ. - Auto-repair the clear ones, idempotently. For each break matching a deterministic rule (
providerOnlywith a known upgrade → grant Pro + record the charge), apply the fix keyed to the break so a re-run is a no-op. - Queue the rest. Everything ambiguous, large, or unruled becomes an exception work-item with a category, owner, age, and the two conflicting records attached — and stays open until an audited fix closes it.
- Emit the metrics. Match rate, break counts by category, and unreconciled amount — the vital signs of whether the money is right.
Pitfalls
- Treating every first-pass mismatch as a real break. A transaction near the cutoff is often just early, not missing. Give breaks a grace period and reconcile over overlapping windows, or you’ll drown in false positives.
- Non-idempotent repairs. A re-run that grants Pro or refunds twice creates new breaks. Key every repair to the break it fixes so re-running changes nothing already fixed.
- Matching on fuzzy fields when a shared key exists. Amount-plus-time matching mispairs transactions; carry the idempotency key end to end so the diff is an exact lookup.
- Silent breaks with no owner or age. A break dumped into a table nobody works is money rotting quietly. Every exception needs an owner, an age, and an escalation threshold.
- Using reconciliation as the primary correctness mechanism. It runs on a delay; leaning on it instead of idempotency, a ledger, and sagas means customers are stranded for hours before the net catches them.
- Reconciling amounts as floats. The same float drift from the ledger will make matched transactions look mismatched by a rounding cent. Compare integer minor units.
Best practices
- Match on a shared idempotency key — carry it end to end so reconciliation is an exact diff, not a fuzzy guess.
- Reconcile settled periods with a grace window — compare closed books, give recent transactions time to settle, and overlap windows so boundary cases are always caught.
- Auto-repair the clear breaks idempotently — deterministic rules for the common shapes, keyed so a re-run is a no-op.
- Make every exception a tracked work-item — category, owner, age, proof, and an audited fix; escalate on aging.
- Watch the match rate and unreconciled amount — the vital signs; a falling match rate is a primary-path bug, not a reconciliation problem.
- Keep it a backstop — prevent errors with idempotency, a ledger, and sagas; reconcile to catch the remainder and to prove the books.
Rapid-fire cheat-sheet (intern → principal)
- "What is financial reconciliation?"
- A scheduled job that diffs two independent records of the same money — your ledger and the payment provider’s — matches what lines up, and flags and repairs what doesn’t. It exists to catch silent money errors that never throw an exception, like a dropped confirmation that leaves a charged customer stranded.
- "Why isn’t your own ledger enough?"
- Your ledger is only your view of the money — it records what you believe happened. A charge that succeeded at the provider but whose confirmation was dropped lives only in the provider’s records; re-reading your own ledger can never reveal it. You need a second independent record and a comparison.
- "What are the kinds of break?"
- Three: at the provider but not in your ledger (dropped/late confirmation), in your ledger but not at the provider (a phantom charge that never landed), and matched-but-mismatched (same transaction, different amount, status, or fee). The shape of the mismatch tells you the repair.
- "How do you match transactions?"
- On a shared unique id — ideally the idempotency key the charge already carries, which the provider files it under, so matching is an exact lookup. Without one you fall back to amount-plus-time-plus-reference, which is fuzzier and can mispair, so you design the shared key in from the start.
- "How are breaks resolved?"
- Deterministic auto-repair rules fix the clear, safe ones idempotently — grant the Pro that was paid for, void a phantom. Ambiguous, large, or unexplained breaks go to an exception queue as tracked work-items with a category, owner, age, proof, and an audited fix. A healthy system auto-resolves the vast majority.
- "Where does reconciliation sit in a correct money system?" (the principal one)
- It is the backstop, not the primary path. Idempotency keys, an append-only ledger, and sagas prevent most errors up front; reconciliation runs after the fact, on a delay, to catch the rare slips a best-effort network guarantees and to prove correctness against an independent record. A rising break rate means fix the primary path — not scale the reconciliation team. Match rate is the vital sign.
The takeaway
By GOAT Engineer. Back to Concept Library. Privacy Policy · Contact.