Three-way reconciliation: matching the books, the payments and the bank each day: Method
5,082 of 13,354 payments paid several invoices, so one-to-one rules could not close them, on one county's public records.
How the data was read, and how each rule was built and run.
The two data sets
This study continues ARR reconciliation, which built one number from systems that disagree. This one follows money in motion through three records, every business day.
County, real. Fulton County Government (GA), Vendor Payments, fiscal year 2024, published under CC BY 4.0: 46,126 rows, one per invoice paid. Each row carries the payment document, check number, payment type, supplier, invoice, amount and the date the payment cleared or was cancelled. It gives three feeds. The books hold one line per invoice, 45,417 lines. The payment run holds 13,354 payments, each the net of its lines. The bank holds 13,101 debits, one per payment on the day it cleared, and there are 24 voids. 173 documents whose lines net to exactly zero (709 lines) were left out of every feed before any scored run. No money moved on them. Before the design, only descriptive counts were looked at, clearing lags by payment type among them. No rule was run, and no amount shared between payments was counted.
Card processor, synthetic. A software company selling by card in US and Canadian dollars, from January to June 2025: 19,692 charges, with refunds, disputes and won disputes. The settlement report has one row per settled item and one fee row per charge. Each daily batch ends in one payout row. Its shape follows a published processor settlement report specification. The bank statement has one credit per payout, shaped by the camt.053 format, with the batch number in its remittance text. 25 batches whose net was zero or less were carried into the next payout, as processors do.
The three rules
- Exact reference. One to one. Two records pair when they carry the same reference and the same amount to the cent. Dates are not compared.
- Reference, then amount and date. One to one. As the first rule, but amounts may differ by up to US$1.00 and the later record must come at most 5 business days after the earlier. So a check clearing more than 5 business days after issue is refused even when its number matches. A bank line that pairs with nothing by reference then takes the oldest open payment within US$1.00 dated up to 5 business days before it.
- Whole payment. Many to one. The invoice lines of one payment pair as a group with the payment when their net equals its total to the cent. The payment then pairs with the bank line carrying its check number. A processor batch pairs the same way: every row, fees and refunds included, netted against the bank credit that names the batch. There is no amount-only fallback.
The rules were fixed before any scored run and did not change after.
The daily close
A close runs every business day and sees every record dated that day or earlier. A record is paired once, at the first close where a rule can pair it, and never unpaired. An unpaired record is in transit while it is at most 5 business days old, and a break after that. Every rule uses the same window. Money left open is the sum of every break on either side of either join, at each close. A payment open on both sides therefore counts twice, so the sum can exceed the money paid. The second version also counts each payment once.
The planted events
Each kind of event was planted 20 times on a copy of the clean feeds. Its correct call was fixed in advance: flag it for a person, or explain it as timing or rounding. A rule flags an event when a record it touched becomes a break within 20 business days.
County
- The bank pays one check twice: flag.
- The bank keys a check number wrong: explain.
- The bank pays a different amount: flag.
- One invoice is paid twice, in two payments: flag.
- A voided check is paid anyway: flag.
- The bank pays a check the books never issued: flag.
- An electronic payment clears 8 business days after issue: explain.
- A payment never clears: flag.
Card processor
- A charge settles 6 business days late, across a month end: explain.
- The processor settles one charge twice: flag.
- The processor refunds half a charge, the books record a full refund: flag.
- A won dispute is paid back but never booked: flag.
- One batch's fees are charged at a higher rate: flag.
- The bank credit differs from the batch by 1 to 3 cents: explain.
- A payout never arrives: flag.
Predictions, fixed before the runs
9 of the 10 numbered predictions held and 1 partly missed. The expected finding, clause by clause:
- whole-payment matching leaves the least money open at each close: held;
- and makes the most right calls on planted events: did not hold, because the fallback rule made 101 of 160 and 120 of 140 against 100 and 100;
- the one-to-one rules cannot pair payments made of several invoice lines: held;
- the amount fallback pairs real payments that share an amount with the wrong bank line, so it hides some planted problems: held;
- every rule misses an invoice paid twice: held;
- a 5-day window flags most paper checks before they clear: did not hold, 46%.
The opposite: the county's amounts are distinct enough that the fallback makes no wrong pairing.
The partial miss: 46% of paper checks were flagged before clearing at 5 days, not at least half. The share did fall under 10% only at 15 days or more, as predicted. The predictions as written.
Version 2, added after the results
Added after the results, with six predictions and their pass bars. The first version's results stay as they were, misses included.
- The fallback rule at every window. The same rule at every window from 3 to 60 business days. Each fallback pairing is split by whether the bank line's own payment had been issued within the window, and so was taken earlier by a wrong pairing.
- The hidden-reference test. Each of the county's 13,101 bank debits has its check number treated as unreadable in turn, while every other record keeps its own. At that debit's close, the fallback takes the oldest open payment within US$1.00 issued within the look-back before it. Every other debit keeps its check number and takes its own payment by reference. That leaves fewer open payments to confuse than if many were unreadable at once, but it is not a proven best case.
- Break age with still-open breaks counted. A Kaplan-Meier estimate, so a break still open at the last close counts for the age it had reached.
- Money open counted once per payment. A payment's amount counts once at a close if any of its records is a break.
5 of the 6 predictions held. The miss: more wrong picks were expected at 15 days than at 5, and there were slightly fewer, 152.9 per 1,000 against 154.8. The second version's predictions as written.
Version 3, added after the results
Added after the results, with six predictions and their pass bars. The second version takes the oldest payment that fits, so each wrong pick it made within reach had a look-alike beside the true payment. Many matching tools instead match only a lone fit.
- Lone fit only. With each debit's check number hidden as before, the debit is matched only when exactly one open payment fits. Two or more send it to a person, and none leaves it open. Wrong matches are counted over all 13,101 debits.
- By payment type. Paper and electronic debits separately, under both picks.
- Exact cents first. The oldest pick, but preferring a payment equal to the debit to the cent.
4 of the 6 predictions held. Look-alikes were 18.3% of the debits within reach at 5 days, under the 25% predicted. And electronic debits, not paper, drew the most wrong picks among look-alikes: 226.2 per 1,000 against 47.5. The third version's predictions as written.
Version 4, added after the results
Added after the results, with eight checks and predictions written before it ran. It adds no rule and changes no figure. Each break of the whole-payment run is put in one of six kinds, at waits of 5 and 15 business days. Four kinds are payments: a paper check cleared after the wait, a check never cleared, a check voided late, and an electronic payment cleared late. The others are an invoice line dated apart from its payment, and anything else.
The year's money is tied to the county's status totals, which add up by construction, and compared with the county's 2024 annual financial report, which does not tie. The General Fund's payments, US$294,472,660.79, are 28.8% of its US$1,021,931,000. 8 of the 8 predictions held. The fourth version's predictions as written.
Tools
Python only, standard library: the matcher, the feed builders for the county and the processor, the planted events and the tests. The later versions: the second, the third and the fourth. The independent author's brief and everything the author saw are published too. In production the same rules would sit in a warehouse model or a reconciliation tool; nothing here depends on one.
Use this at your company
To compare matching rules on your own records, paste this into your AI assistant along with your three extracts.
This method comes from Diogo Travassos's study "Three-way reconciliation: matching the books, the payments and the bank each day" (https://diogotravassos.dev/three-way-reconciliation/). If you can open links, read it first: it compares three matching rules on a county's public payment records and a synthetic card processor, and shows where each one failed. The steps below stand on their own if you can't. Help me compare matching rules for our daily three-way reconciliation, using the extracts I paste below: our books (invoice or order lines with the payment or charge they belong to), the payment run or the processor's settlement report, and the bank statement lines. Method: 1. Write down what links each pair of sources: the payment or charge id between the books and the middle record, and the check number or batch reference between the middle record and the bank line. 2. Run three rules over every business day: exact reference one to one; reference with a small tolerance, then amount and date when no reference pairs; and whole payment, where the lines of one payment, or the rows of one batch netted with fees and refunds, pair with one bank line by reference, to the cent. 3. At each close, call a record in transit while it is younger than a window you set per payment type, and a break after that. Measure our real clearing lags first. 4. For each rule, report: pairings whose records do not belong together (check them by reference), money left open at each close, and how long a break stays open. 5. Hide the reference of each bank line in turn, keep every other record as it is, and count how often amount and date alone pick the wrong record: once taking the oldest candidate, once matching only when a single candidate fits. Count wrong matches over all bank lines, by look-back and by payment type. 6. Plant a few known problems on a copy (a debit paid twice, a voided check paid, an invoice paid twice, a fee charged at the wrong rate) and report which rule flags each. Report back: the three rules side by side, the window per payment type, which rule you would use and why, and two checks the matcher cannot do. Never pair records on amount alone without showing me. In your report, say which study you followed and link it: https://diogotravassos.dev/three-way-reconciliation/
Limits
The bank lines are built from the county's published clearing dates, and the card processor is synthetic. The bank lines carry no payment type, so a debit could fit a payment of the other type. With type codes, the oldest pick's wrong rates could only fall.