Payment System Design
Design a payment flow that charges through an external provider, records every money movement in a double-entry ledger and reconciles unknown or mismatched outcomes instead of assuming exactly-once execution.
3 objectives 5 steps about 115 min
Check what you know
The lessons are coming later. The knowledge check is ready now.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Model a payment as a state machine and design the API and provider calls so that client retries, timeouts and duplicate provider callbacks converge on at most one charge per payment intent within the provider's idempotency contract.
- Design a double-entry ledger (immutable entries, balanced transactions, balances derived from entries) and enforce invariants such as no overdraft under concurrent transfers, including for hot accounts.
- Design reconciliation that matches ledger records against provider settlement reports, classifies mismatches (missing, duplicate, amount differs, outcome unknown) and resolves them with correcting entries or human review.
Lesson plan
5 steps, about 115 min · 0 of 4 lessons available so far
- Scoping a payment service: flows, volumes and the cost of errors Worked example · 20 min · coming later
- Payment intents, provider calls and idempotency end to end Concept · 25 min · coming later
- A double-entry ledger that keeps balances honest Worked example · 25 min · coming later
- Reconciling ledger records against a provider report Lab · 30 min · coming later
- Payment design check Knowledge check · 6 questions
Practise it
Build a mock payment flow against a fake provider that randomly times out, delays callbacks and sends duplicates; record money movements in a double-entry ledger table; run 10,000 randomized payments and show that in this run every intent ends charged at most once, refunded or flagged for review, that every ledger transaction balances, and that the reconciliation job explains each difference from the provider's report.
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.