Skip to content

ONE QUESTION. YOUR REASONING.

Design a payment system

Design the payment system behind an online store like Amazon: buyers pay by card, and sellers get paid out.

System designPayments and ledgersSeniorStaff

YOUR BRIEF

What to work through

Work through a payment system as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Pay-in: take money from a buyer by card for one or more sellers
  • Pay-out: send money to sellers, for example monthly
  • Record every money movement in a ledger
  • Keep each seller’s balance in a wallet
  • Show the status of a payment: pending, success or failed

BEFORE YOU START

Constraints to discuss

  • Never charge a buyer twice for one order
  • Correctness over throughput: about 10 transactions a second in Alex Xu’s framing
  • No payment data lost when a component fails
  • Mismatches with the payment provider found by a nightly reconciliation
Need a starting point?

Watch for these common gaps as you prepare:

  • Treating money as a counter instead of a double-entry ledger
  • Ignoring retries, so a timeout leads to a second charge
  • Storing amounts as floating-point numbers
  • No reconciliation with the provider
Read: System design questions and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad click aggregator
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.