Code RoomRecurring billing engine
MediumPrep Room Coding #3254

Recurring billing engine

System designDistributed systemsMid–Senior~40 min

Design the recurring-billing engine for a subscription service with 30M active subscriptions. Each billing cycle it must charge the right card on the renewal date in the customer's timezone, retry failed charges on a smart schedule (dunning), handle expired/updated cards, and avoid ever double-charging a cycle. Charges spread across the day by timezone, peaking a few thousand/sec. Describe the scheduling architecture and how you guarantee each subscription is charged at most once per cycle.

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.