Skip to content

Reconciliation against an external system

A scheduled comparison of your records with an outside authority's records (a provider's settlement file, a bank statement, a merchant's live page), matching what agrees and routing each difference to a bounded fix.

On this page

What it is

Reconciliation is the accounting practice of confirming that two sets of records agree. The classic form is bank reconciliation: the balance in your own books is compared with the balance on the bank's statement, and each difference is examined and, where appropriate, corrected. Differences come from three main places: timing (an entry recorded on one side but not yet the other), transactions the bank recorded that you didn't, and plain recording errors.

In a system design the two records are your ledger and an external system's view of the same events, and the external side is usually the authority on what happened to the money. You already receive its events as they happen, but that stream is not a complete record. Stripe's webhook documentation says an endpoint may receive the same event more than once, that events may arrive in a different order from the one they were generated in, and that failed deliveries in live mode are retried for up to three days before they stop. Tracking event IDs catches the duplicates, and the provider's delivery status and API help with events you know you missed; a bug in your own handler, or an event you don't know you missed, can still leave your ledger and the provider's out of step. Reconciliation is the periodic check that finds that drift.

The raw material is the provider's settlement report. Stripe's payout reconciliation report groups the transactions in each payout by category, such as charges, refunds and fees, offers an itemized CSV of each one, and can include metadata you attached so rows match records in your own system. By default, Adyen generates its settlement details report per merchant account and per payout batch; each transaction line carries a status such as Settled or Chargeback, along with Adyen's own PSP reference and the merchant reference you sent in the payment request, and the file also carries fee, deposit correction and payout lines. That echoed merchant reference is what turns matching from guesswork into a lookup: you choose it when you create the payment, and it comes back on the statement.

LevelQuestion it answersWhat it costs

Account level

Does the closing balance in my ledger equal the closing balance on the provider's statement for this period?

Cheap: two numbers per period. Shows that a gap exists, not which items caused it.

Transaction level

Does each statement line correspond to one posting of mine, for the same amount?

A matching pipeline and a statement with references. Localizes the gap to the items behind it.

Matching usually runs in tiers. Exact matches on references and amounts go first because they are fast and deterministic. A documented tolerance band comes next for cases where small differences are expected, such as rounding after a currency conversion. What is left is classified: a timing difference is an item you posted that the provider has not settled yet, handled by matching within a time window; a true break is a mismatch that is still there after the expected settlement window has closed. A true break gets its own record with the internal posting ID, the external event ID, the amount of the discrepancy, a classification, an owner and, once fixed, a link to the correcting entry. The fix is a new compensating posting dated to when the event really happened, so the original and the correction both stay visible.

Fees deserve their own line. A statement that shows a net deposit is hard to match against a ledger that recorded the gross charge. Posting the gross amount, each fee, and the net payable as separate entries lets the matcher compare each one to its statement line, and gives you the full gross-to-net trail even when the bank shows a single net figure.

When to use it

Reconcile when another party holds the truth about something your system also records: money settled by a payment provider, a balance at a bank, stock at a warehouse, a price on a merchant's page. The event path is the fast path; reconciliation is the slow, complete path that bounds how long a mistake can survive. Run it at the rhythm of the external system's closes: a provider's payout batch closes on the payout frequency set for the account, and a card payment captured today may appear in a settlement file at T+2, so a job that compares both sides on the same clock will flag in-flight items as missing. Compare the period the statement covers, and treat items inside the known lag as pending.

Reconcile per item, before acting, when an observation arrives from a party you don't control: a browser extension, a user submission, a partner feed. Treat it as a claim about the external system rather than a fact. Store it in a pending state, fetch the authoritative value yourself from the merchant's page or the provider's API, and promote it to the chart or the alert when the authority agrees. A claim the authority contradicts is discarded and counted against its submitter. The cost is a fetch and a short delay per item, which is worth it when one accepted falsehood reaches thousands of people.

Keep this separate from read lag. A buyer who reads a stale status from a replica a moment after paying is seeing replication delay, a gap that typically closes when the replica catches up and is handled by routing that user's next read to the primary or by a version check (see Replication and read replicas). Reconciliation looks at a different question: whether the two records agree once the expected delays have passed.

When not to

Skip it when no outside record is better than yours. If the two copies are both your own (a cache and its database, two replicas of one table), the job you want is an internal consistency check or an anti-entropy repair (Anti-entropy repair with Merkle trees), and there is no external statement to download.

Don't make a batch job your main defense against duplicates and lost events. Most reconciliation failures start in ledger design: retries that post twice, running totals stored as mutable columns, and postings without a reliable event time. Prevent those at write time with an idempotency key on a unique index and postings that are added but not edited, and let reconciliation catch the few things prevention missed. A queue that fills with hundreds of exceptions a day is a signal to look upstream, at the ledger's write path, the provider adapter or the matching rules, rather than to hire more reviewers.

Don't send each difference to a human, and don't compare before the statement is complete. Rounding differences below a documented tolerance can be auto-posted to a rounding account, while a single tolerance applied to all transaction types either hides real breaks or floods the queue. On timing, Stripe notes that a payout can reach your bank before its report data is ready, and its report groups a payout by its estimated arrival date rather than the date the bank posts it. A job that runs before the data lands can produce exceptions that disappear once the report is available.

Compared

ApproachHow it worksWhen it's the right choiceWhat it misses

Webhooks without a check

The provider pushes each change and you post it

Low volume and low stakes, where a lost event costs little and would be noticed anyway

A lost, duplicated or reordered event that your handler and delivery monitoring miss can stay unnoticed for a long time

Account-level check

Compare closing balances per period

A first alarm, or when the provider gives you no transaction detail

Says a gap exists, not which items made it

Transaction-level matching

Match each statement line to a posting by a shared reference

Money, and anything an auditor will ask about item by item

Needs a reference on both sides and a pipeline to run the match

Per-item check before acting

Confirm a claim against the authority before publishing it

Untrusted inputs whose effect is wide: one bad price alerting thousands

Adds a fetch and a delay to each item; doesn't catch drift in what was already accepted

Continuous matching

Match as events and statement lines arrive, not once a day

High volume where a full day of drift is too much money at risk

More moving parts, and the books still need a period close

In a picture

Your ledgerProviderstatement

Step 1 of 4

Two records of the same money

Your ledger holds what you believe happened. The provider's statement holds what settled. Each side was written independently, so neither can be assumed to match the other.

How to say it in an interview

The common mistake

Quiz

A payout lands in the bank on Tuesday morning. The nightly job that night flags each transaction in it as missing from the provider. The next night they all match. What was wrong?
Your ledger shows a payment of 50.00. The statement shows a settled line of 48.55 and a separate fee line of 1.45. What should the design do?
A browser extension reports a price far below any recent one for a product with thousands of subscribers. Which path fits?
What makes transaction-level matching a lookup rather than a guess?

Questions that use this

Related

Sources

  1. Wikipedia: Reconciliation (accounting)
  2. Stripe documentation: Receive Stripe events in your webhook endpoint
  3. Stripe documentation: Payout reconciliation report
  4. Adyen documentation: Settlement details report
  5. Formance: Transaction Reconciliation at Scale: An Engineering Guide
Sign in to report a mistake