Code Room
System designMediumsd-g131
Subject PaymentsLevel Mid–Senior~40 minCommon in Distributed systems interviewsIndustries Technology

Question

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.

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