Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Public data

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

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

Card processor

Predictions, fixed before the runs

9 of the 10 numbered predictions held and 1 partly missed. The expected finding, clause by clause:

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.

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.

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.