Design Subscription Renewals and Payment Retries for Google One
Last updated: November 29, 2026
Quick Overview
Design the billing system that renews tens of millions of Google One subscriptions on their billing dates, retries failed payments with a grace period, and handles plan upgrades, downgrades, and proration.
0
0
0 solved
Design the billing system that renews tens of millions of Google One subscriptions on their billing dates, retries failed payments with a grace period, and handles plan upgrades, downgrades, and proration.
A Google onsite design question about recurring billing. The interviewer checks scheduling of renewals at scale, dunning and grace logic, proration math, idempotent charges, and how entitlement (storage quota) stays in sync with billing state.
What the Interviewer Expects
- Schedule renewals by due date with sharded workers
- Make each renewal charge idempotent per billing period
- Implement retry schedules with grace and account hold states
- Compute proration for mid-cycle plan changes
- Keep entitlements in sync with subscription state via events
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you prorate an upgrade from 100 GB to 2 TB halfway through the month?
- What happens to the user's files when payment fails for 30 days?
- How do you avoid charging twice if the renewal worker crashes mid-charge?
- How do you handle 31st-of-month billing dates in February?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Monthly and annual plans, many currencies and tax regimes, family sharing.
- Renewals: tens of millions per month, with spikes on the 1st of the month.
- Failed payments: retry over a grace period w...
High-Level Design
- Subscription Service (Spanner):
subscription(id, user, plan, state, current_period_start, current_period_end, next_charge_at). - Renewal Scheduler: index
(next_charge_day, shard). Worker...