End-of-Day Reconciliation
Proving the internal ledger agrees with what the banks actually did — an automated diffing engine over external clearing files.
Table of Contents
Why reconciliation exists
Recording a movement internally is only half of correctness; the ledger must also be proven to agree with what the banks actually did. Reconciliation is an automated diffing engine that compares the internal ledger against external clearing files (BAI2, ISO 20022 CAMT.053, or clearinghouse CSVs) on a recurring cycle.
%%{init: {'theme': 'base'}}%%
flowchart LR
classDef dataLayer fill:#2d6a4f,stroke:#52b788,color:#ffffff
classDef workflow fill:#5c4a8a,stroke:#c77dff,color:#ffffff
classDef integration fill:#e9c46a,stroke:#f4a261,color:#1a1a1a
classDef human fill:#e76f51,stroke:#bc4749,color:#ffffff
Files["Clearing files\nBAI2 · CAMT.053 · CSV"]:::integration
Ingest["Ingestion\nnormalize to staging"]:::workflow
Match["Matching engine\ntrace no. · idempotency key · amount/date/account"]:::workflow
Ledger["Internal ledger"]:::dataLayer
Recon["RECONCILED / SETTLED"]:::dataLayer
Queue["Exception queue\noperator review"]:::human
Files --> Ingest --> Match
Ledger --> Match
Match -->|matched| Recon
Match -->|break| Queue
The reconciliation loop
- Ingestion — parse each incoming settlement file into a normalized external-transaction staging table.
- Matching engine — match external records against internal
ledger_transactionson external reference / network trace number,idempotency_key, and an amount + timestamp-window + account constraint. - Break classification — every record resolves to one of three outcomes:
| Outcome | Meaning | Action |
|---|---|---|
| Matched | internal and external agree | advance the movement to RECONCILED / SETTLED |
| Unmatched (internal only) | we show funds sent; the bank statement doesn’t | raise a delayed-settlement alert |
| Unmatched (external only) | a debit/credit at the bank with no internal record | emit an exception event to the operational exception queue |
Reconciliation runs as a durable Temporal workflow (see Temporal) so a mid-run failure resumes without double-counting, and every break becomes a human task with a full audit trail (see Data).