Example
A customer on a $20/month plan upgrades to a $50/month plan halfway through the billing cycle. They’re charged $15 (the prorated difference for the remaining half of the month).
Setting up
- CLI
- Dashboard
Add a Preview with
proration config to a priced plan item:autumn.config.ts
atmn push, then apply with atmn push --yes.Proration options
On Increase
On Decrease
Item-level proration only applies to prepaid items. It decides how to bill a change in the quantity a customer bought, like seats or workspaces. Usage-based items are billed on what was used, so quantity changes don’t apply.
Plan-level proration
When a customer switches between plans (upgrade or downgrade), Autumn prorates automatically:- Upgrades: the customer is charged the prorated difference between the old and new plan prices for the remainder of the billing cycle. This happens immediately.
- Downgrades: the plan change is scheduled to take effect at the end of the current billing period. The customer continues on their current plan until then.
ExampleA customer is on a $20/month plan and upgrades to a $50/month plan on day 15 of a 30-day cycle.
- Old plan credit: 10 credit
- New plan charge: 25 charge
- Net charge: 10 = $15
Controlling proration in attach
By default, plan switches prorate immediately. You can override this behavior using theproration_behavior parameter in billing.attach:
Custom line items
If you need full control over what the customer is charged during a plan switch, you can passcustom_line_items to replace the auto-generated proration invoice entirely. This is only valid for immediate plan changes (e.g. upgrades).
custom_line_items is provided, Autumn skips its own proration calculation and creates an invoice with exactly the line items you specified. Amounts can be negative to represent credits.