By the last page, this is the design you will have built.
Lesson · 13 pages · about 11 min
Design a payment system
Charging cards for shops exactly once: a hot balance row that makes a line on Black Friday, an append-only double-entry ledger, idempotency keys that make retries safe, and nightly reconciliation.