A payment system is the money-movement backbone behind a checkout: a merchant charges a customer's card, funds flow through external card networks and banks, and the merchant is eventually paid out. Stripe, Adyen, and PayPal are the reference points.
What makes it a hard system-design problem is that it moves real money — and money has no undo. Two failure modes are unacceptable:
- Double-charging — a network retry must never charge the customer twice.
- Losing or inventing money — every cent debited from one account must land, exactly once, as a credit somewhere else.
So the whole design is organized around exactly-once semantics and a strongly consistent, double-entry ledger that is the single source of truth. Idempotency keys tame retries; the ledger guarantees conservation of money; asynchronous settlement and reconciliation keep our books in agreement with external banks. This is the canonical "correctness over everything" interview.