Code RoomSubscription refunds and credits
MediumPrep Room Coding #3253

Subscription refunds and credits

System designDistributed systemsMid–Senior~40 min

Design the refund and credit handling for a subscription-billing platform. When a customer downgrades, cancels mid-cycle, or is overcharged, the system must compute prorated credits, decide whether to refund to the original payment method or issue account credit (a credit note applied to future invoices), and stay consistent with the revenue ledger. ~1M subscriptions, lots of plan changes daily. Describe the model and how you keep proration, refunds, credits, and recognized revenue consistent.

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.