Skip to main content

Payment system

You are interviewing for Engineering Manager. This is a 45–60 minute whiteboard / word-problem. Talk through observations as you go. Draw.

This prompt is adapted from System Design School: Design a Payment System. Read this document only. Do not open the interviewer page. Do not open the SDS solution until after the mock.


Context​

You are designing a service that moves money: a payer is charged, a payee is credited, and balances have to stay right.

Every step runs over networks that fail. An external payment provider (card network or bank) executes the actual charge. That provider cannot join your database transaction.


Problem​

Design the payment system.

In scope: start a payment, execute it through the provider, keep an auditable record of money movement, expose balances and payment status, and refund or void a payment.

Out of scope: fraud detection, the provider’s internals, and fee/pricing engines.


What to produce​

  1. Clarify requirements. Ask questions. Write down what you are optimizing for.
  2. Sketch APIs or main operations.
  3. Draw a high-level design and walk through a payment, including a retry and a timeout.
  4. Go deep on the hardest parts.
  5. Close as an engineering manager: what ships first, who owns what, what you measure, how you talk about risk.