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

Variations to practise

3 min read+10 XP

Chapters used

Approach (1), Estimation (2), SQL vs NoSQL (8), Replication (14), Sharding (15), Consistency (16), Transactions and sagas (17), Message queues (22), Outbox (23), APIs, idempotency and webhooks (24), Rate limiting (25), Failures and circuit breakers (29), Observability (30), Checkout (42).

Try these variations

Each is a common follow-up. Answer in two minutes, then check the sketch.

  1. "Pay merchants every day." → A payout job reads each merchant's ledger balance, sends a bank transfer with an idempotency key, and posts a balanced payout transaction; failed payouts reverse it.
  2. "Handle chargebacks." → A dispute creates a hold transaction moving funds from the merchant to a disputes account; the outcome either releases or confirms it.
  3. "Multi-currency." → Ledger accounts per currency; conversions are transactions through FX accounts at a recorded rate; never mix currencies in one line.
  4. "10× payment volume." → More shards by merchant, bucketed hot accounts, more bank adapter capacity, and reconciliation run in parallel per bank and per day.