# Providing Prorated Discounts on Upgrades & Downgrades in Freemius Checkout

By default, Freemius *prorates* plan updates (upgrades or downgrades).

![Freemius checkout - pricing subtotal with a prorated discount and time range](/help/assets/ideal-img/freemius-checkout-proration-compressed.9a2484a.480.png)

Unlike the commonly used *prorating* implementations which preserve the renewal payment processing time, Freemius’ *proration* works slightly different and will restart the billing date based on the time of the plan update. This methodology simplifies understanding the discount for the customers and also benefits the sellers who will receive the initial worth of the new plan (minus the discounts) for the full billing period right away.

## How Freemius Prorates Plan Updates[​](#how-freemius-prorates-plan-updates "Direct link to How Freemius Prorates Plan Updates")

### Proration from a Subscription (Monthly or Annual)[​](#proration-from-a-subscription-monthly-or-annual "Direct link to Proration from a Subscription (Monthly or Annual)")

Customers who are updating a plan that was purchased as a subscription will receive a *proration* discount, based on the unused portion of their previous plan:

```
remaining_period = (1 - number_of_days_past_from_the_old_plan_last_payment / number_of_days_in_past_billing_cycle )



proration_discount = max(0, remaining_period x old_plan_last_payment )
```

**Examples:**

* If a user purchased a single-site monthly pro package for $10 per month and after 2 months and 15 days upgrades to the annual billing cycle of the same single-site pro plan for $100 per year - the customer will have already paid $10, and will have used half of their current billing cycle. Therefore, the initial *prorated* amount will be $95 ($100 - $10 / 2).
* If a user subscribed to a single-site annual pro license for $100 per year and after 3 months decides to downgrade to a single-site annual starter plan for $80 per year - the customer will already have paid $100, and have used only a quarter of the current billing cycle. Therefore, the *proration* discount for the remaining period will be $75, and the initial price for the single-site annual starter plan will be $5 ($80 - $75). The first renewal payment will be scheduled for a year from the downgrade date and will cost $80.

### Proration from a Lifetime License[​](#proration-from-a-lifetime-license "Direct link to Proration from a Lifetime License")

Customers who purchased a lifetime plan will be eligible for a *proration* discount only if they update their plan within 30 days from the time of purchase. The *proration* discount is calculated as follows:

```
proration_discount = min(prev_lifetime_payment, new_lifetime_price)
```

**Examples:**

* If a user purchased a single-site lifetime pro license for $300 and after 3 days upgrades to a 5-site lifetime pro license for $600, they are only charged $300 for the upgrade.
* If a user purchased a single-site lifetime starter license for $150 and after 6 days upgrades to a single-site lifetime business plan for $400, they are only charged $250 for the upgrade.
* If a user purchased a single-site lifetime pro license for $300 and after 2 months upgrades to a 5-site lifetime pro plan for $600, they are charged the full $600.

To understand why lifetime upgrades aren't just calculated as the difference in price, regardless of how long ago the original purchase was, the following two scenarios may help:

Long-Term Lifetime Upgrade Fairness

A customer purchases a lifetime license for $300. Then, after 5 years (intentionally exaggerated time for emphasis) decides to upgrade for a higher $500 plan. If you discount them with $300 it basically means that they’ve used your product/license/support for free for 5 years. If a different customer purchase that same lifetime plan for $500 at the same time the other user upgrades from the $300 to the $500 plan, they both end up paying the exact same amount in total ($500), yet, the 1st customer already been using the product for 5 years.

Car Upgrade Analogy

Or another example, to drive it home (pun intended!). Let’s say you buy a car and then after 5 years decide to buy a more expensive one from the same brand. Would you expect to get your money back? No, because you’ve already used the product, which is analogous to receiving support (aka warranty).

Therefore, we have the 30-day time limit in place to protect from this edge case.

## Customizing the 30-Day Period for Lifetime Licenses[​](#customizing-the-30-day-period-for-lifetime-licenses "Direct link to Customizing the 30-Day Period for Lifetime Licenses")

While we recommend keeping the 30-day period as is, you can customize it in the [Developer Dashboard](https://dashboard.freemius.com/).

1. Navigate to the desired product.
2. Go to the **Plans** → **Prorated Discount** tab.
3. Update the **Lifetime License Proration Period** to your desired number of days. You can also set it to **Unlimited** to always provide a proration discount for lifetime plan updates.

![Customize lifetime license proration](/help/assets/ideal-img/customize-lifetime-license-proration.4362391.480.png)

## Proration with Coupons[​](#proration-with-coupons "Direct link to Proration with Coupons")

When updating a plan with a percentage-based coupon, the *proration* discount will be calculated first, and the coupon discount will apply to the discounted price as the last discount.

## Availing Proration to Buyers[​](#availing-proration-to-buyers "Direct link to Availing Proration to Buyers")

### WP Admin In-Dashboard Plan Update[​](#wp-admin-in-dashboard-plan-update "Direct link to WP Admin In-Dashboard Plan Update")

When a customer updates their plan within their WP Admin on a website where they’ve already activated the license, it will automatically be recognized by the checkout, and the user will be presented with the following options:

1. **Upgrade my current license**: *If the this option is selected, the purchase will be *prorated*, as described in the [proration algorithm above](#how-freemius-prorates-plan-updates)*.

2. **Subscribe for another license**: *If the account owner of the installed product is different than the license owner, there’s no way to update the plan and the only option is to purchase another license!*

![Freemius SDK - options to upgrade or buy new license on checkout](/help/assets/ideal-img/freemius-dashboard-checkout-upgrade-type.1406bb3.480.png)

### Check Out With License Key[​](#check-out-with-license-key "Direct link to Check Out With License Key")

When a customer is trying to update their plan from your website, the loaded checkout will include the following label: ***Renewing or Upgrading? Enter license Key***

For WordPress and App products only, buyers can add their relevant license key to the Checkout UI:

![Freemius Checkout - License input field for customer updating their plan](/help/assets/ideal-img/freemius-checkout-license-input.d7d6dfd.480.png)

Once the license key is verified, the purchase will be *prorated* as described in the [proration algorithm above](#how-freemius-prorates-plan-updates).

<!--$-->

[](/help/videos/freemius-checkout-license-input.mp4)

<!--/$-->

### Buyer Purchases via the Customer Portal[​](#buyer-purchases-via-the-customer-portal "Direct link to Buyer Purchases via the Customer Portal")

While using the Customer Portal, buyers can use the displayed upgrade or downgrade link which applies the proration

<!--$-->

[](/help/videos/freemius-customer-portal-license-proration.mp4)

<!--/$-->

### Programmatically Generated Upgrade Links[​](#programmatically-generated-upgrade-links "Direct link to Programmatically Generated Upgrade Links")

Makers can use the API to [programmatically generate upgrade checkout links](https://freemius.com/help/help/documentation/checkout/integration/hosted-checkout/.md#programmatically-generating-checkout-links) which will have an automatic proration discount.

### Manually Generated Upgrade Links[​](#manually-generated-upgrade-links "Direct link to Manually Generated Upgrade Links")

When sharing links manually via different media like emails to customers, makers can also share a link with the:

* [`license_key`](https://freemius.com/help/help/documentation/checkout/integration/freemius-checkout-buy-button/.md#license_key)
* and new [`plan_id`](https://freemius.com/help/help/documentation/checkout/integration/hosted-checkout/.md#generating-checkout-links-for-plans) or [`pricing_id`](https://freemius.com/help/help/documentation/checkout/integration/hosted-checkout/.md#generating-checkout-links-for-pricing) etc.

![Generate Freemius Checkout Links for Plans](/help/assets/ideal-img/freemius-generate-checkout-links.d4985d5.480.png)

For example:

```
https://checkout.freemius.com/product/{product_id}/plan/{new_plan_id}/?license_key={license_key}&pricing_id={new_pricing_id}
```

Always URL-encode the license key

Please be sure to [URL encode](https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding) the parameters when constructing the URL.
