Design a Payment Gateway
A hiring manager says "design a payment gateway" and the fast way to fail is to draw a ledger. The gateway is the layer at the front door; settlement happens behind it. A merchant hands it a charge. It validates that charge, protects the card number, and picks a processor. It gets an authorization decision back across a network that drops responses, and tells the merchant yes or no. Everything about settlement, the batched movement of funds and the double-entry books, lives downstream and is a separate design. Confuse the two and you spend your time on accounting while the interviewer waits to hear how a retry does not charge the card twice.
So draw the boundary first and say it out loud. On one side is the merchant, who wants a simple call: charge this card this amount, tell me if it worked. On the other side are the processors and card networks, which are slow, occasionally down, and reachable only over a link that can lose your request or lose their reply. The gateway is the thing in the middle that makes an unreliable, multi-party integration look like one dependable call. That framing is the whole lesson. Get it, and idempotency, tokenization, timeouts, and webhooks stop being a checklist and become the obvious answers to a boundary you have already named.
- 1 problem, worked step by step
- 1 diagram
- about 24 min
Premium lessonAmerican Express interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
American Express interview guideKnow what American Express asks before you walk in.
9 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.