What is Proration?
Proration is the adjustment of charges based on the unused portion of the current billing period when a subscription is upgraded or downgraded.Types of Proration
For bothprorate and invoice proration types, the subscription plan always changes immediately, whether the change is an upgrade or a downgrade. The only difference between the two proration types is when the price difference is charged or credited.
Invoice Immediately (invoice)
The prorated price difference is charged or credited immediately when the subscription is upgraded or downgraded.
Next Invoice (prorate)
The prorated price difference is charged or credited on the next invoice on updgrading or downgrading a subscription.
How to change the default proration setting using dashboard
1
Go to Organization Settings
In the Polar dashboard sidebar, click on Settings.
You can also go directly to:
Scroll down to Subscriptions section.
https://polar.sh/dashboard/${org_slug}/settingsScroll down to Subscriptions section.

2
Choose the Proration type
Choose the default proration behavior: Invoice Immediately or Next invoice.
The default proration setting is changed successfully.

How to change the default proration setting using the OAT API
You can change the default proration behavior using the Update Organization API.How to prorate when updating subscription via API
1
Create an organization Token
Create a new organization token by following our Organization Access Tokens guide.
2
Save your Access Token
After creating your access token, you will be able to view it. Please copy and save your access token.

3
Copy the Subscription ID
- In the Polar dashboard sidebar, navigate to Sales > Subscriptions for your organization.
You can also go directly to:
https://polar.sh/dashboard/${org_slug}/sales/subscriptions

- Click on the Subscription you want to upgrade/downgrade and copy its Subscription ID.

4
Copy the Product ID
- In the Polar dashboard sidebar, navigate to Products > Catalogue for your organization.
You can also go directly to:
https://polar.sh/dashboard/${org_slug}/products

- Retrieve the Product ID for the item you wish to upgrade the subscription to by clicking on the ⋮ (More options) menu next to chosen products and selecting Copy Product ID.

5
Call the Update Subscription API
Call the Update Subscription API as follows.Make sure to replace:
- subscription_id with the ID of the subscription you want to update
- product_id with the new product ID
-
type_of_proration with the desired proration type:
invoice: to charge/credit the prorated price difference immediatelyprorate: to charge/credit the prorated price difference on next invoice
Some examples for proration amount calculation
You can create a subscription with two plan options, one for $5 and other for $20 by following Create Product Variants.Case 1: Upgrading the subscription
You can upgrade a subscription by following the steps outlined in Subscription Upgrades, which explains the process from both the merchant’s and the customer’s perspectives. Example 1: Proration type =invoice

prorate

If the billing interval changes, i.e. daily to monthly or monthly to yearly or vice versa, the proration is always applied as invoice (even if set to prorate).
Case 2: Downgrading the subscription
You can downgrade a subscription by following the steps outlined in Subscription Downgrades, which explains the process from both the merchant’s and the customer’s perspectives. Example 1: Proration type =invoice

prorate

If the billing interval changes, i.e. daily to monthly or monthly to yearly or vice versa, the proration is always applied as invoice (even if set to prorate).

