Chapter 1. Billing architecture: plans, trials, proration.
A mature subscription system separates two engines. The billing engine decides what to bill, when, and how much (catalog, cycles, trials, proration, credit notes, taxes). The payment engine collects the money (stored credentials, authorizations, retries). Mixing the two produces fragile architectures, where a simple promotional discount can break the payment collection chain.
Catalog and plans
Products, prices, currencies, billing intervals, and discounts make up a versioned catalog, because a price change must never rewrite the history of existing subscribers (grandfathering).
State machine
Every subscription moves through the lifecycle trialing → active → past_due → canceled/churned, and each transition is a timestamped event that serves as the source of truth for metrics.
Fees
Invoice generation, proration, credit notes, taxes (VAT OSS in Europe), and sequential numbering that meets accounting requirements.
Events and webhooks
Payment succeeded or failed, trial ending, card expiring. Billing publishes the events; the CRM and dunning consume them.
Subscription lifecycle
Customer
Signs up with a free trial
Authenticated CIT (SCA): the payment mandate is set up
Billing engine
Converts the trial into a paid subscription
First invoice on day 14, amount notified to the customer before the charge
Payment engine
Charges each cycle as an MIT
Renewals with no customer action
Billing engine
Handles upgrades and proration
Mid-cycle plan change, credit note or additional invoice
Dunning
Responds to every failed charge
Retries + customer messaging, before the account is churned
| Model | Example | Billing complexity |
|---|---|---|
| Flat rate | €9.99/month | Low: fixed amount, simple proration |
| Per seat | €12/user/month | Medium: proration on every seat added or removed |
| Usage-based | €0.04 per API call | High: meter aggregation, billing in arrears |
| Hybrid | Flat rate + overage | High: two billing logics on one invoice |
Pricing models and what they mean for billing
The proration formula
For a mid-cycle upgrade, the formula is amount due = (days remaining ÷ days in the cycle) × (new plan price − old plan price). From there, two schools of thought compete: bill the difference immediately, or add it to the next invoice. What matters is consistency. The customer must be notified of the exact amount before any charge.
Subscription object (simplified data model)
{
"subscriptionId": "sub_9f27",
"status": "active",
"plan": { "id": "pro-monthly", "amount": 2900, "currency": "EUR", "interval": "month" },
"trialEnd": "2026-06-15",
"currentPeriod": { "start": "2026-07-01", "end": "2026-07-31" },
"paymentMethod": { "type": "networkToken", "expiry": "2028-11" },
"mandate": { "citAuthenticatedAt": "2026-06-01", "initialSchemeTxId": "MCC4XR..." },
"pendingProration": { "amount": 1450, "reason": "upgrade-pro-to-max" }
}≈ $1.5T
estimated size of the subscription economy in 2025
UBS3.7×
faster growth for subscription companies than for the S&P 500 over the 11 years from 2012 to 2022
Zuora, Subscription Economy Index🎯 Quick question
A customer upgrades from the Pro plan (€29/month) to the Max plan (€49/month) mid-cycle (15 days left out of 30). How much proration do you charge?