CoursesSystem Design Case Studies
The Payments Ledger
Money that must always add up: an append-only double-entry ledger, transfers that survive any retry, reconciliation against providers that retry too, and the whole design under a provider outage.
- Lessons
- 5
- Exercises
- 29
- Minutes
- 34
- 1
An Append-Only Ledger
After this lesson you can model money as double-entry postings that are never updated, derive a balance from them, and say why a balance column is a cache and not the truth.
DebugMultiple choiceShort answer - 2
Money That Survives a Retry
After this lesson you can make every money-moving call safe to repeat end to end, from the client through the ledger to the external provider, and say what each layer's key is.
DebugFill blankMultiple choiceTrace - 3
Reconciling With the Outside World
After this lesson you can consume a provider's webhooks safely, reconcile the ledger against the provider's statement, and treat every mismatch as a case rather than a correction.
DebugMultiple choiceShort answer - 4
Checkpoint: Ledger VariationsCheckpoint
The same design under different numbers: an in-app wallet, a marketplace with split payments, and a ledger across two partitions.
DebugMultiple choiceShort answer - 5
Boss: The Payments LedgerBoss
The whole design: the question, the numbers, the ledger and the state machine, the keys at every boundary, the provider outage, the double capture, the revised flow, and the tradeoff you defend.
Code orderMultiple choiceShort answerTrace