Online School, Messy Billing, and the Proration Rabbit Hole
While designing the database and Product Requirements Document (PRD) for an online school project, I ran into a problem I was not expecting. The school had multiple subscription plans. For simplicity, imagine: Live Class Plan:₦50,000 per term Video On Demand Plan: ₦30,000 per term Hybrid Plan (Live Classes + Video On Demand):₦70,000 per term. Initially this looked simple. Students subscribe. System charges them. Done. Then I asked: What happens if somebody changes plans halfway through the term? Suppose: A student already paid: Live Class Plan ₦50,000 Two months later: They decide: Upgrade to Hybrid Plan Do we charge: ₦70,000 again? That would be unfair. Do we charge: ₦20,000 difference? Maybe. But what if they already used most of their subscription period? This question led me to something called: Proration What Is Proration? Proration simply means: Charging customers only for the portion they actually use. Instead of pretending subscriptions always begin and end perfectly. Proration tries to answer: "How much value remains in the current subscription?" and "How much should the customer pay for the new one?" Simple Example Assume: Term Length: 100 Days Student buys: Live Plan ₦50,000 After: 40 Days they upgrade. This means: Used: 40 Days Remaining: 60 Days Value remaining: Remaining Value = Remaining Days / Total Days = 60 / 100 = 60% Remaining credit: 60% × ₦50,000 = ₦30,000 Hybrid costs: ₦70,000 Therefore: Amount to bill = New Plan Price − Remaining Credit = ₦70,000 − ₦30,000 = ₦40,000 Student pays: ₦40,000 instead of: ₦70,000 This feels fairer. Downgrades Are More Complicated What if: Hybrid user: ₦70,000 moves to: ₦30,000 plan Should the system: Refund money? Create account credits? Apply discount later? Ignore downgrades until renewal? This is where: Proration Rules become important. What Are Proration Rules? Proration calculations are useless without rules. The business must decide: Rule 1: How Is Remaining Value Calculated? Options: Daily basis Weekly basis