Code Room
System designMediumsd-g396
Subject PaymentsLevel Mid–Senior~40 minCommon in Security interviewsIndustries Technology, Software development

Question

Design the authorize-then-capture engine for a platform where an order is authorized at purchase but captured later (on ship, or per-item as items ship), authorizations expire after ~7 days (varies by network), and a single auth may be partially captured multiple times up to the authorized amount. ~2M orders/day. You must capture before the auth expires (or re-auth), never capture more than authorized in total, and handle the case where some items ship after the auth has already expired. How do you model and schedule this?

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.