Recurring billing engine
Your task
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.
It covers
- Recurring billing
- Retry scheduling
- Smart dunning