What proration does
When a customer switches plans mid-cycle, Recurso doesn’t wait for the next renewal to make things fair. It settles the difference immediately:- Credits the unused portion of what they already paid on the current plan.
- Charges the new plan, prorated for the time left in the cycle.
Every amount is in the currency’s smallest unit (cents, paise) and the
proration is time-based — computed from the seconds remaining in the cycle, not
whole days. Each side is truncated (never rounded up) to a whole minor unit.
The formula
For a plan change at timet inside a cycle running [start, end]:
remaining / total fraction — the unused time you’re
crediting is exactly the remaining time you’re charging for. A positive net is
billed now; a negative net becomes a credit note.
Worked example
A customer on 50/mo on day 10 of a 30-day cycle. Prices are stored in minor units:$20.00 → 2000, $50.00 → 5000.
$20 ↔ $50):
Coupons: prorated at the price actually paid
If the subscription carries a coupon and the current period’s invoice was discounted, both sides of the formula use the discounted prices, not the list prices. The credit refunds what the customer actually paid for the unused time, and the charge matches what a renewal on the new plan would bill inside this discounted period. Worked example — the same$20 → $50 upgrade at day 15, but with a 50%-off
coupon applied this period:
once coupon
after its first period, a repeating coupon past its window) prorate at list
prices, exactly as above. The preview endpoint reflects whichever applies, so
what you show the customer is always what they’ll be charged or credited.
Previewing from the API
You never have to compute this yourself. Ask Recurso for the exact breakdown — no writes, no side effects — before you commit a plan change:Notes on the math
- Truncation, not rounding. Each side (
credit,charge) is truncated to a whole minor unit independently. This is deliberate and matches the ledger — the net can be off by at most one minor unit from a rounded calculation, and it never over-charges. - Time-based, not day-based. Real proration uses seconds remaining in the cycle. The examples above use days for legibility; the ratio is identical.
- Same-price switches net to zero. Moving between two equally-priced plans mid-cycle bills nothing — the credit and charge cancel exactly.
Next steps
Subscriptions
The upgrades and downgrades that trigger proration
Revenue recognition
How prorated amounts recognize