Wallet balance with authorization holds

DesignHard50 minUber and PayPal style

Your task

Design a digital wallet for a ride-hailing app: 80M users, peak ~12,000 debits/sec, mixing real-time ride charges, top-ups, P2P transfers, and authorization holds (a hold reserves funds at trip start and settles for the final fare at trip end). A user must never be able to spend reserved funds, and concurrent debits on the same wallet must not overdraw. Describe the balance model, how holds are represented, and how you keep available-balance correct under heavy concurrency.

It covers

  • Balance management
  • Holds
  • Real time debit