10 parts · 18 chapters
Ledgers, Payments and Reconciliation
The backend mirror of Money, Identity and Trust. A ledger is the one system in a fintech that must never be wrong, and the techniques that keep it right are old: double-entry bookkeeping, append-only journals, idempotency and reconciliation. This course teaches them as code.
Ten parts: double-entry accounting for engineers; ledger schemas, accounts, balances and holds; idempotency end to end; payment state machines; rails, webhooks and callbacks; reconciliation and breaks; settlement, float and FX; fees, interest and rounding; audit, regulators and reporting; and a capstone ledger service with a reconciliation job.
double entryDebits, credits, account types and the invariant that every posting sums to zero.
schemasAccounts, journal entries, postings, balances, holds and versions.
idempotencyKeys, request fingerprints, stored responses, and idempotent consumers.
state machinesTransfers, payouts and card authorisations as explicit states.
reconciliationMatching the ledger with banks and processors, and working breaks.
money mathsMinor units, rounding rules, interest accrual, FX and fees.
00
Double-Entry Accounting for Engineers
Debits, credits and the zero-sum invariant · Modelling a business as accounts
2 ch · ~12 min01Ledger Schemas, Accounts, Balances and Holds
The tables · Posting safely: concurrency, hot accounts and corrections
2 ch · ~12 min02Idempotency End to End
Keys, fingerprints and stored responses · Idempotent consumers and retention
2 ch · ~12 min03Payment State Machines
States, transitions and the unknown · Timeouts, enquiries and reversals
2 ch · ~12 min04Rails, Webhooks and Callbacks
How rails behave · Webhooks, done safely
2 ch · ~12 min05Reconciliation and Breaks
Matching the ledger with the world · Breaks, ageing and operations
2 ch · ~12 min06Settlement, Float and FX
Settlement and float · FX: quotes, trades and revaluation
2 ch · ~12 min07Fees, Interest and Rounding
Fees and taxes · Interest accrual and rounding policy
2 ch · ~12 min08Audit, Regulators and Reporting
Audit trails and maker-checker
1 ch · ~8 min09Capstone: A Ledger Service with Reconciliation
The build
1 ch · ~8 minBuilt on Trust and ScalingAssumes Money, Identity and Trust (the client side of money flows), SQL and PostgreSQL Internals, and Backend System Design part 3.