Phase 1 — Clarify & Scope
Interviewer: Design a payment system — think Stripe, PayPal, or an internal payment service for an e-commerce platform. What do you want to clarify?
Candidate: Critical questions:
- What's the payment flow — are we processing cards directly (acquirer integration), or acting as a payment orchestrator on top of existing PSPs (Stripe, Braintree)?
- What payment methods — credit/debit cards, ACH, digital wallets, BNPL?
- What's the transaction volume and average value?
- Synchronous (user waits for confirmation) or async (bank transfer)?
- Which compliance requirements — PCI-DSS, SOC2, geographic regulations?
Interviewer: Payment orchestrator on top of PSPs (Stripe primary, Braintree as fallback). Credit/debit cards and digital wallets. 100,000 transactions/day, average $50. Synchronous confirmation required — user waits for payment success/failure. PCI-DSS compliance required.
Candidate: Let me size this:
At typical PSP fees of 2.9% + $0.30 per transaction:
Interviewer: What are the core requirements?
Candidate:
- Accept payment (card tokenization → charge via PSP)
- Route to best PSP (lowest cost, highest approval rate, geographic availability)
- Handle PSP failure with automatic retry and failover
- Idempotent payment operations — never double-charge
- Full audit trail for…
In the full tutorial
- Phase 2 — High-Level Architecture
- Phase 3 — Deep Dive & Evolution
- Phase 4 — Robustness & Operations