Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Synthetic data

ARR reconciliation: payment rails

On one synthetic company, a three-way match and a month-end cash close caught 10 of 10 processor-to-books faults written blind, against 0 of 10 for the billing checks, which do not read these records, at 0.3 false alarms a month (any alarm at 20 of 108 month ends); 4 of the 10 showed only as an account out of balance.

The billing checks never read the processor, the bank or the ledger, and none of the ten faults touched what they read. On 6 of the catches a record-level check also fired, naming a payout, charge, invoice or bank line; the other 4 showed only in the tie-out and left a person to search the journal (a split I defined after seeing the results). The blind author wrote no fault that moved every record in step, the one case only the three-way match sees, so this set does not test it. One synthetic company, one independent author, one run per fault.

Key figures
New checks, held out10 of 10faults written blind; a record-level check fired on 6, the tie-out alone on 4 (split defined after the results)Billing checks, held out0 of 10they never read processor, bank or ledger recordsFalse alarms a month0.36 clean companies, 108 month ends; any alarm at 20 of 108 month ends, the cash application rule alone firing at 19Self-test7 of 7built by the same hand as the checks; 1 of 8 declared faults found nothing to change

Main limitation The clean ledger is posted by code from the same records the tie-out rebuilds, so on clean data it ties by construction; the tie-out is evidence only against a change to one side. The checks were run on the six clean companies to find code errors before they were frozen, so the zero cut-off and tie-out alarms partly reflect that debugging, and the blind author was handed the posting rules the tie-out restates. The processor, the bank and the ledger are synthetic, written by rules I chose.

Held out: caught or missed, by check family

An independent author who never saw the checks wrote 10 faults between the card processor, the bank and the books, from the schemas, the posting rules and 20 sample rows of each table. Each fault was applied once to a copy of the clean records and scored at every month-end close from the month it entered: a check catches it when it flags something the clean company does not flag at the same close. The billing checks are everything the study had before: its frozen dbt tests and its checks against order forms, approvals, coupons and telemetry.

The new checks caught 10 of 10, half of them through more than one family; the billing checks caught 0 of 10.

fireddid not fire

Each held-out fault and whether each check fired on it
FaultBilling checksThree-way matchPayout reconciliationCash applicationMonth-end cut-offLedger tie-outResult
Two payouts imported twice into the bank and the booksdid not firedid not firefireddid not firedid not firefiredcaught
Three fee rows dropped from the settlement importdid not firedid not firefireddid not firedid not firedid not firecaught
Two capture notices lost after approvaldid not firefireddid not firedid not firedid not firefiredcaught
An identified contract payment left as unapplied cashdid not firedid not firedid not firefireddid not firefiredcaught
A payout booked the day before it reached the bank, across a month enddid not firedid not firedid not firedid not firefiredfiredcaught
Currency rate inverted on two settlementsdid not firedid not firedid not firedid not firedid not firefiredcaught
A customer refund booked as a processing feedid not firedid not firedid not firedid not firedid not firefiredcaught
A dispute win booked as if the fee came backdid not firedid not firedid not firedid not firedid not firefiredcaught
A manual journal netting a fee against billingsdid not firedid not firedid not firedid not firedid not firefiredcaught
Two payout amounts with their cents cut offdid not firedid not firefireddid not firedid not firefiredcaught
Faults caught01311910
Show the data
Each held-out fault: the checks that fired, how each ledger account it moved differs from the clean books at the final month end, as debits less credits, and what the author predicted a month-end close would do, set beside the results only after they were in
FaultChecksLedger against the clean booksAuthor predicted (compared after the results)
Two payouts imported twice into the bank and the bookscaught by the payout reconciliation and ledger tie-outcash +US$4,202 and processor clearing −US$4,202caught
Three fee rows dropped from the settlement importcaught by the payout reconciliationprocessor clearing +US$13.11 and processor fees −US$13.11caught
Two capture notices lost after approvalcaught by the three-way match and ledger tie-outreceivables +US$920 and processor clearing −US$920caught
An identified contract payment left as unapplied cashcaught by the cash application and ledger tie-outreceivables +US$97.65 and unapplied cash −US$97.65caught
A payout booked the day before it reached the bank, across a month endcaught by the month-end cut-off and ledger tie-outcash +US$4,005 and processor clearing −US$4,005caught
Currency rate inverted on two settlementscaught only by the ledger tie-out, as processor clearing and currency gains and losses out of balance; no record namedprocessor clearing +US$241.57 and currency gains and losses −US$241.57caught
A customer refund booked as a processing feecaught only by the ledger tie-out, as refunds and processor fees out of balance; no record namedrefunds −US$168.90 and processor fees +US$168.90caught
A dispute win booked as if the fee came backcaught only by the ledger tie-out, as processor clearing and dispute fees out of balance; no record namedprocessor clearing +US$17.50 and dispute fees −US$17.50caught
A manual journal netting a fee against billingscaught only by the ledger tie-out, as billings and processor fees out of balance; no record namedbillings +US$2.43 and processor fees −US$2.43missed
Two payout amounts with their cents cut offcaught by the payout reconciliation and ledger tie-outcash −US$1.63 and processor clearing +US$1.63caught

Source: the payment-rails round's results; each fault run once on a fresh copy of the clean records.

What stayed unexplained

What each check needs from a finance team

Each check is a join between records a finance team already receives. What it needs is access to those records with the keys intact, and a rule written down where the check applies one.

Each new check: what it compares, what the finance team must keep, held-out faults it caught, and false alarms a month on the clean companies
CheckComparesNeedsHeld-out catchesFalse alarms a month
Three-way matcheach card invoice against the processor's captures on it, and each capture against its settled charge in the settlement reportthe processor's charge export with the invoice id on every charge, and its daily settlement report10.01
Payout reconciliationeach payout against the sum of its settlement items (charges less fees, refunds and chargebacks) and against the bank depositthe settlement report itemised per payout, and bank statements that carry the payout reference30
Cash applicationeach customer transfer applied again by a written rule (the invoice it names, then an open invoice of the same amount, else unapplied) against where the ledger put itbank statements with the payer and the remittance text, open invoices per customer, and the rule written down10.31
Month-end cut-offevery entry from a record posting within five days of the month end, against the month its posting rule givesposting rules that give each record a posting day, and the capture, settlement and bank arrival days10
Ledger tie-outeach ledger account at the month end against the same balance rebuilt from the bank, the processor and billingall of the records above, a rebuild per account, and a tolerance (US$1 an account here)90

What a close compares, on this company

Limits

How it was built

The description of the ledger given to the blind author avoids any word that is also the name of one of the study's frozen dbt files, since that could hint at the checks.

Use this at your company

To find out whether your own month-end close would catch errors between the card processor, the bank and the books, paste this into your AI assistant and give it read-only access to a copy of the records listed in step 1.

This method comes from Diogo Travassos's study "ARR reconciliation: payment rails" (https://diogotravassos.dev/arr-reconciliation/payment-rails.html). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't.

Help me find out whether our month-end close would catch errors between the card processor, the bank and the books.

Method:
1. Collect the records: the processor's charge or event export with our invoice id on each charge, its daily settlement report itemised per payout, the bank statements with remittance text, the open invoices, and the general ledger with the source of each line.
2. Write the posting rules down: which record posts which entry, to which accounts, on which day (capture, settlement, fee, refund, dispute, payout arrival, customer transfer).
3. Write five checks and declare each tolerance before running them: invoice to capture to settlement for every card invoice; each payout against its settlement items and the bank deposit; each customer transfer applied again by a written rule (the invoice it names, then an open invoice of the same amount, else unapplied) against where the ledger put it; every entry posted in the month its rule gives, for records within five days of the month end; and each ledger account against the same balance rebuilt from the bank, the processor and billing.
4. Run the checks on several clean months and count every flag as a false alarm.
5. Freeze the checks. Have an independent author who never sees them write 10 realistic faults from the schemas and the posting rules, apply each one literally to a copy of the records, and score the new checks and our existing billing checks separately.

Report back: faults caught by each check and by the existing checks; false alarms a month for each check; which catches named the record and which only showed an account out of balance; and every fault missed, with the record that would have shown it.

In your report, say which study you followed and link it: https://diogotravassos.dev/arr-reconciliation/payment-rails.html

Method

Who wrote the held-out faults

The author is independent of the checks: given only the definition, the schemas and the posting rules, it never saw them. It worked in a folder outside the repository. That folder held 28 files: the definition, the billing schemas, a description of the processor, the bank and the ledger with its posting rules, and sample rows of every table. Nothing in it held or named a check, a test, a fault, a protocol or a result.

The processor, the bank and the ledger

A new generator entry point writes them from the company's own billing documents, never from a record a fault touched, with its own random draws, so the original company is unchanged. Every card invoice is charged on its date; some first charges are declined and retried, and some approvals cover only part of the invoice, with a second charge for the rest. Captures settle 1 to 3 business days later. Fees are an assumption, 2.25% plus US$0.22 a charge and 1% more on a card in another currency, and a dispute costs US$17.50. Cards in other currencies are converted on a stated rate path. The processor pays out its balance each business day and the payout reaches the bank the next. Sales-led customers pay by bank transfer, usually quoting the invoice, sometimes another invoice or nothing. The ledger posts each record by nine written rules: invoice, capture, settlement currency difference, fee, refund, dispute, dispute won, payout and customer transfer.

The new checks, as declared before any ran
  • Three-way match: each card invoice's captures sum to its total, within US$0.01; each capture has exactly one settled charge for the same presented amount.
  • Payout reconciliation: each payout equals the sum of its settlement items, and one bank line with its reference and amount arrives 1 to 3 business days later.
  • Cash application: each customer transfer applied again by the written rule must land where the ledger put it.
  • Month-end cut-off: records posting within 5 days of the month end are booked in their own month.
  • Ledger tie-out: each account within US$1 of its rebuild from the source records.

Each runs at a month-end close with the records of the next 5 days, as a close is worked in the first days of the next month.

How it was scored

Each fault ran once on a fresh copy of the clean records. The new checks ran at every month-end close from the month the fault entered; a fault counts as caught when they flag something the clean company does not flag at the same close. The checks against order forms, approvals, coupons and telemetry ran at the same closes. No fault changed any of the billing extracts, so the frozen dbt tests saw the clean company's own inputs: the clean control ran once in this round and passed all 96. False alarms come from every month-end close of the reported period on 6 clean companies, 108 closes in all.

Self-test, written by the same hand as the checks: each declared fault, the checks predicted to fire before any ran, and the checks that fired
Declared faultPredictedFired
A charge captured twice, in every recordThree-way matchThree-way match
One day's settlement report missingThree-way match, Payout reconciliation and Ledger tie-outThree-way match, Payout reconciliation and Ledger tie-out
Payouts booked gross, fees never bookedLedger tie-outLedger tie-out
A refund never postedLedger tie-outnot applied
A chargeback reversal posted twiceLedger tie-outLedger tie-out
A payout split across two monthsMonth-end cut-off and Ledger tie-outMonth-end cut-off and Ledger tie-out
Currency booked at the capture day's rateLedger tie-outLedger tie-out
A payment applied to another customer's invoiceCash applicationCash application