Code RoomAuthorize-then-capture with expiry
MediumPrep Room Coding #3514

Authorize-then-capture with expiry

System designSecurityMid–Senior~40 min

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.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.