Lesson 15 of 16
45. Design a Payment System (Stripe / UPI)

Sources

3 min read+10 XP

Source notes

  • UPI volume: more than 20 billion transactions in August 2025, the first month above that mark, per NPCI data as reported in the press; checked 2026-10-08.
  • Idempotent requests and signed webhooks: Stripe documentation (see Chapter 24's source notes).
  • Card data handling and tokenisation: PCI DSS (Payment Card Industry Data Security Standard).
  • Double-entry bookkeeping as the basis of payment ledgers: standard accounting practice; payment companies have described ledger designs on these lines in engineering posts.
  • Payment volumes, fees, ledger line sizes and retention are interview assumptions agreed in Step 1, not figures for any real company. Arithmetic computed 2026-10-08.
  • Idempotent intents, balanced ledger with reversing refunds, pending resolution by callback, signed and de-duplicated callbacks, and reconciliation breaks: tested 2026-10-08 (code/ch45_payments.py, all checks pass).