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

45.11 What would you say in the last five minutes?

3 min read+10 XP

Step 6: Wrap-up (5 minutes)

  • Bottlenecks: ledger writes on hot accounts (bank_clearing, fees): split them into sub-accounts or buckets and roll up; bank adapter limits (rate limiting and multiple acquirers).
  • Single points of failure: banks and networks (circuit breakers, routing to alternatives), database shards (synchronous replicas, failover with no lost commits).
  • Correctness: idempotency at every hop, double-entry ledger, pending + status checks, daily reconciliation, signed callbacks.
  • Security and compliance: card vault and tokens, encryption, audit logs, access controls, and data retention per regulation.
  • Next with more time: payouts and settlement schedules, disputes and chargebacks, fraud scoring before authorisation, multi-currency with FX accounts, and subscriptions.

Memory code: "Never twice, never lost, always balanced, proven daily."