10. Subscription Billing

Chapter 10 of 24 · 15 min
EXERCISE

Implement a proration calculation for mid-cycle subscription changes. Given a customer on the Starter plan who upgrades to Professional on day 15 of a 30-day billing cycle, calculate the proration credit for the unused Starter days and the prorated charge for Professional.