RECONCILIATION

Two records of one day, and three reasons they disagree

L216 MINMONEY
PREDICT

You reconcile Owoleaf's ledger against the processor's settlement file for one day. You pair rows by amount, queue whatever is left, and the totals bridge to the kobo. What do you know?

Reconciliation compares two independent records of the same money and explains every difference. For Owoleaf that is its own ledger of card top-ups and the processor’s settlement file for the same day. They disagree in three ways. A row is missing on one side. The amount differs, often because the processor netted its fee. Or the timing differs: a top-up at 23:58 lands in tomorrow’s file, and yesterday’s late one lands in today’s.

The fix is a set of matching rules run strictest first, an exceptions queue in which every item is a real break with an owner, and a totals check that bridges one total to the other.

▶ SIMULATION
OWOLEAF LEDGER, 10 NOV
—
SETTLEMENT FILE, 10 NOV
—
last step—
exceptions queue—
✓ every matched pair is the same transaction✓ every row in the exceptions queue is a real break✓ totals bridge with ₦0.00 unexplained
SCHEDULE
01[LEDGER]LEDGER: Owoleaf's 10 Nov top-ups: 6 rows, ₦116,500.00
02[FILE]FILE: the processor's 10 Nov settlement file: 6 rows, ₦71,312.50
03[MATCHER]MATCHER: pair rows with equal amounts, dates within a day
04[OPS]OPS: everything left goes to the exceptions queue, with an owner
05[OPS]OPS: totals check: bridge the ledger total to the file total
Start of match on amount scenario. 5 steps.
// match on amount: the first row with the same amount wins
for (const l of ledger) {
  const f = file.find((x) => !x.used && x.amount === l.amount && within(x.date, l.date, 1));
  if (f) { pair(l, f); f.used = true; }
}
// whatever is left is "a break"

Watch the status column and the queue. MATCH ON AMOUNT pairs the two ₦25,000 top-ups the wrong way round and pairs today’s 23:58 top-up with yesterday’s: three wrong pairs, and the totals still bridge. MATCH ON REFERENCE ONLY makes no wrong pair but leaves eight exceptions, six of them false. The fix leaves two, each with an owner. FIX RULES, PARSER DROPS A ROW runs the same rules on a file whose no-reference row was skipped on load: no pair is wrong and L6 looks like an ordinary exception, but the totals bridge leaves ₦6,000.00 unexplained against the file’s control total: that is the check that shows a row went missing on the way in.

BREAK IT NOT YET

These are the fix’s passes, split between two people running them. The amount pass looks for equal amounts within a day. Order the passes so that at least one pair joins two different transactions.

GOAL: a matched pair joins two different transactions

FIX IT NOT YET

Rewrite match to return pairs [ledgerIndex, fileIndex]. Rules, in order: same reference and same amount; same reference where the file row is net of a fee (gross === ledger amount and gross - fee === amount); then, for a file row with an empty reference only, equal amount with dates (whole days) at most one apart. Each row pairs at most once. Anything else stays unpaired for the exceptions queue. Amounts are kobo.

Mental model:

A reconciliation is a proof that two records describe the same money. Pair on the strongest key first, the reference, and let each looser rule (fee netted, carried in, amount and date) see only what the stricter ones left. Whatever remains goes to an exceptions queue with an owner, and the totals bridge must close to zero. Agreeing totals prove nothing is lost, not that anything is paired right.

IN PRODUCTION

Payment operations at any wallet, merchant or payout company: the daily match of the ledger against processor settlement files, bank statements and scheme reports, with a fee line, an in-transit list and an aged exceptions queue. Safeguarding and custodial accounts are reconciled the same way, against the bank's balance. Settlement timing itself is the subject of the settlement float lesson.

IN INTERVIEWS

“Design the daily reconciliation between our ledger and the bank.” Name the three mismatch kinds, then the rule order: reference, reference with fee, timing and carried-in items, amount and date for rows with no reference. Say why amount alone is unsafe. Describe the exceptions queue (owner, age, reason) and the totals bridge, and say what each catches. Mention that the ledger and the file must be independent, or the reconciliation proves nothing.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.

USED IN

Chapters that build on this lesson.

NEXT: CHARGEBACKS →