Getting Started

Building Blocks

Custom Fields

Subscription Features

Localization

Invoices

Credits

Order Management

Billing Features

Taxes

Payment Methods

Direct Debit Payments

Configuring Gateways

Revenue Recovery

Hosted Pages

Notifications

Reports and Analytics

Data Privacy & Security

Fraud Management

Migration

Open Source Resources

Other Features

API Integration

Third Party Integrations

Billing Mode & Proration 

Note: The information on this page is only applicable to those sites for which Day-Based Billing Mode - Beta has been enabled. This feature allows you to choose between day-based billing and millisecond-based billing in Chargebee. Contact support@chargebee.com  to enable it for your site. If you are not part of this Beta program, please refer to this page to understand proration in Chargebee.

Introduction 

Billing Mode

Chargebee allows you to choose the billing mode for your site. This is the granularity of time to which your services are billed. You can account for services either to the day or to the millisecond. In other words, when you bill your customers, the minimum accountable duration can be either a day or a millisecond.

Proration

Changes can be made to subscriptions in the middle of their terms. For example, a subscription may be upgraded or downgraded to a different plan, or quantities may be added or removed. Since this introduces a change in the price of the subscription, prorated credits and charges can be raised to ensure proper billing.

Since billing mode can be either day-based or millisecond-based, proration follows suit. So when proration happens, the minimum accountable duration for the charges or credits is either a day or a millisecond, as set by billing mode.

Configuration 

Billing mode and proration can be configured under:

Settings > Configure Chargebee > Billing rules > Billing Mode

Billing Mode

You can choose either calendar day-based billing or millisecond-based (default) billing for your site.

Day-based
Billing is done to the calendar day. In this mode, whenever a subscription starts, regardless of what time it actually started, its start timestamp is set to the beginning (00:00:00.000 hrs) of the day and the end timestamp is set to the end (23:59:59.999 hrs) of the last day of the billing period. These times are only indicative; any proration calculations in day-based billing mode do not use the time component.

Moreover, when day-based billing is enabled, you must set whether — while canceling subscriptions — the date of cancellation is billed or not. (To set this for the site, select Settings > Configure Chargebee > Subscription Cancelation and change the When subscription is canceled, include the cancellation date in the billing period? toggle.)

Millisecond-based
Billing is done to the millisecond. This means that subscription terms can start at any time in Chargebee. The end of the term timestamp is one plan billing duration after the subscription start timestamp. For example, a subscription could start at July 23, 2019, 12:30:33.756. If the billing period of the plan is a month, the end of the term would be at Aug 23, 2019, 12:30:33.755.

Proration for Subscription Change 

  • The configuration here allows you to choose the default behavior while changing any subscription. Checking the box enables proration-during-subscription-change by default.
  • While actually changing the subscription, you can override the default setting by using the Apply prorated credits and charges checkbox on the change subscription page.
Note
  • Proration does not apply to coupons that accompany your plans. As rebates on the items in your plans and addons, coupons are not prorated.
  • As noted above, Chargebee only provides time-based billing. This kind of billing is suited for services that are billed based on time-of-use such as SaaS. If you are selling subscriptions for physical goods which are billed based on deliveries, please disable proration.

Billing Mode Change 

Changing the billing mode on your test site is allowed but for switching billing modes on the live site, please contact support@chargebee.com . Here's how changing the billing mode affects Subscriptions.

Millisecond-based to Day-based

Warning: Performing this switch results in the loss of timestamp information from the subscription data: any start and end timestamp data more granular than a calendar day is lost and cannot be recovered. Switching back to millisecond-based billing is thus not possible.

Since day-based billing mode accounts subscription terms in units of calendar days, on switching to it from millisecond-based billing mode, all start timestamps in Chargebee such as subscription start/activation/renewal timestamps and trial start timestamps are changed to the beginning (00:00:00.000 hrs) of their calendar days. Further, all term end timestamps in Chargebee are changed to the end (23:59:59.999 hrs) of the previous calendar day. Again, these times are only indicative; any proration calculations in day-based billing mode do not use the time component.

Example:

Billing mode: millisecond-based
Plan period: 1 month
Trial period: 10 days

Assume that the Trial start timestamp is Apr 25, 2019, 16:28:09.034
Then Subscription start timestamp would be (10 days later): May 5, 2019, 16:28:09.034
And term end timestamp would be (1 month later): Jun 5, 2019, 16:28:09.033
Next renewal timestamp would be (a millisecond after term end): Jun 5, 2019, 16:28:09.034

After switching to day-based billing mode, the timestamps would change as follows:

Trial start (Set to beginning of the day): Apr 25, 2019, 00:00:00.000
Subscription start (Also set to beginning of the day): May 5, 2019, 00:00:00.000
Term end (Set to end of the day before): Jun 4, 2019, 23:59:59.999
Next renewal (Set to beginning of the day): Jun 5, 2019, 00:00:00.000

Note: Though renewal times are aligned to the start of calendar days, it can take up to 2-3 hours for the renewal to actually go through due to the scale of the operations.

Day-based to Millisecond-based

When switching from day-based to millisecond-based billing, the subscription data is unchanged. Further, billing and proration for the site happens to the millisecond. This switch is only allowed on the test site.

Note

When prorated credits are raised against invoices, the amounts are always calculated as per the billing mode in which the invoice was generated. For example, if an invoice was generated in millisecond-based billing then even after switching the site to day-based billing, any prorated credits against the invoice are still calculated to the millisecond.


Proration Mechanism 

Proration for plans and addons is accomplished in two parts:

  • The calculation of credits for items (whether plan-specific or addon-specific items) unsubscribed from, for the unused time period of the current billing term and
  • The calculation of charges for the newly subscribed items for the remaining portion of the current billing period.

During subscription change, prorated credits or charges will be issued based on:

  • The type of change (upgrade, downgrade, or quantity change)
  • The status of the current term's invoice.

For example,

  • When the current term's invoice is in a Payment Due or Not Paid state, then during subscription change, the credits generated will be of the type Adjustment and these credits will automatically be applied to this invoice and the invoice's due amount will get reduced.
  • If the current term's invoice is in a Paid state, the credits generated will be of the type Refundable and will automatically be applied to the future invoice(s).

We now discuss some real examples in Chargebee to demonstrate proration. The examples, save the last one, are for day-based billing.

Plan Quantity Downgrade (Paid Invoice)

Subscription created with plan quantity 2, on the 1st of September
Plan Amount: $10
Invoice Generated: $10x 2 (qty)= $20
Invoice is Paid
Subscription is changed on the 16th of September

New subscription quantity: 1
Invoice will not be generated
Prorated Refundable Credits $5x 1 (qty)= $5 will be issued

Subscription was created with the plan quantity set to 2. In the middle of the month, the plan quantity was downgraded to 1. In this case, credits for the quantity of 1 for the unused period of 15 days would hence be generated. Since the current term's invoice is in the Paid state, the credit note would be of the type Refundable.

Plan Quantity Downgrade (Payment Due Invoice)

Subscription created with the plan quantity 3 on the 1st of September
Plan Amount: $20
Invoice Generated: $20 x 3 qty = $60
Invoice is unpaid

Subscription is changed on the 16th of September

New subscription quantity: 2
New invoice will not be generated
Adjustment Credits $10 x 1= $10 will be created and adjusted against the Payment Due invoice. The final invoice amount will get reduced to $50.

Subscription was created with the plan quantity set to 3. In the middle of the month, the quantity was downgraded from 3 to 2. Since the current term's invoice is unpaid, a credit note of the type Adjustment will be created for the price of 1 quantity and automatically adjusted against the invoice's due amount.

Plan Quantity Downgrade (Partially Paid Invoice)

Suppose that a subscription is created for a monthly plan priced at $30 per unit as follows:

Plan Amount: $30/unit
Start date: Sep 1st
Quantity: 3 units
Invoice Generated: $30 x 3 units = $90
Payment received: $80
Payment due: $90-$80 = $10

Say the quantity for the subscription is reduced to 2 on Sep 15th.

Prorated amount for the unused service: plan price x unused quantity x fraction of time unused = $30 x 1 x 0.5 = $15.
So the total amount for the term changes to: invoice amount - prorated amount for unused service = $90-$15 = $75.
Since $80 has already been paid, a refundable credit note for $80-$75 = $5 is generated.
Also, an adjustment credit note for the original unpaid amount of $10 is also generated.

Plan Quantity Upgrade (Paid Invoice)

Subscription created with plan quantity 1, on the 1st of October
Plan Amount: $10
Invoice generated: $10x 1 (qty)= $10
Invoice is paid

Subscription was changed on the 16th of October

New subscription quantity: 3
Credit Note will not be generated.
A new invoice is generated for the 2 additional quantities
New Invoice generated: $5 x 2= $10

Subscription was created with the plan quantity set to 1. The plan quantity was then upgraded to 3. In this case, no Credit Note will be created and an invoice will be generated for the two additional quantities.

The way proration is calculated and applied in the case of a Plan Quantity Upgrade, remains the same regardless of the Invoice status (Paid, Payment Due, Not Paid, or Partially Paid).

Plan Change Downgrade (Paid Invoice)

Subscription created with plan (Plan A), on the 1st of March
Plan A amount: $60
Invoice is Paid

Subscription's plan downgraded to a new plan (Plan B) on the 11th of March

Plan B amount: $30
Invoice of $20 will be generated
Prorated Refundable credits $40 will be created, out of which $20 will be applied against the above invoice. The remaining credit balance ($20) will be available for future use.

Subscription was created with the plan (Plan A) of amount $60. The subscription's plan was then downgraded 10 days later to another plan (Plan B) of the amount $30. In this case, an invoice of $20 will be generated for the Plan B's amount for the period of 20 days and prorated Refundable Credits of $40 will be created for Plan A's unused period. Refundable Credits will then be automatically applied to the $20 invoice.

If the previous Invoice was unpaid, Adjustment Credits will be created and applied to this invoice.

Mid-term Change of Quantity for Quantity-based Pricing Models

The following examples show how proration happens when changing the quantity mid-term for plans with tiered, volume or stairstep pricing.

Volume Pricing

Consider a monthly plan with the following volume pricing model:

Tier 1 2 3
Units in tier 1-100 101-200 201 or more
Price per unit $5 $4 $3

New Subscription Sign-up:

Say a customer signs-up for a new subscription as follows:
Sign-up date: Sep 1st
No. of units: 90
Since the no. of units falls under tier 1, the billing price would be: 90 x $5: $450

On Subscription Change:

Now say the quantity purchased is increased mid-month:
Date of subscription change: Sep 16th
New no. of units: 110
Since the no. of units now falls under tier 2, the new billing price would be: 110 x $4 = $440
Prorated billing price for the new subscription period (Sep 16 - Sep 30): $220
Credits on the original subscription for that period: $225

So for the subscription change, there will be refundable credits raised for $225 - $220 = $5

Tiered Pricing

Consider a monthly plan with the following tiered pricing model:

Tier 1 2 3
Units in tier 1-100 101-200 201 or more
Price per unit $5 $4 $3

New Subscription Sign-up:

Say a customer signs-up for a new subscription as follows:
Sign-up date: Sep 1st
No. of units: 90
Since the no. of units falls under tier 1 , the billing price would be: 90 x $5: $450

On Subscription Change:

Now say the quantity purchased is increased mid-month:
Date of subscription change: Sep 16th
New no. of units: 110
Since the no. of units now fall under tier 1 and 2, the new billing price would be:
100 x $5 (tier 1) + 10 x $4 (tier 2) = $500 + $40 = $540

Prorated billing price for the new subscription period (Sep 16 - Sep 30): $270
Credits on the original subscription for that period: $225

So for the subscription change, there will be a charge for $270 - $225 = $45

Stairstep Pricing

Consider the following stairstep pricing for a monthly plan:

Step 1 2 3
Units in step 1-100 101-200 201 or more
Price $300 $550 $700

New Subscription Sign-up:

Say a customer signs-up for a new subscription as follows:
Sign-up date: Sep 1st
No. of units: 90
Since the no. of units falls under step 1 , the billing price would be: $300

On Subscription Change:

Now say the quantity purchased is increased mid-month:
Date of subscription change: Sep 16th
New no. of units: 110
Since the no. of units now falls under step 2 , the billing price would be: $550

Prorated billing price for the new subscription period (Sep 16 - Sep 30): $275
Credits on the original subscription for that period: $150

So for the subscription change, there will be a charge for $275 - $150 = $125

Proration for Millisecond-based Billing

Assume the following:

Plan A: monthly, price: $1000
Plan B: monthly, price: $2700

Say a customer subscribes to Plan A starting Jan 10, 2019, 16:02:35.480 hrs.

So we have:

Subscription start timestamp: Jan 10, 2019, 16:02:35.480 hrs.
Given that the plan is a monthly one, the subscription term would end on the same date, next month and a millisecond before:
Subscription end timestamp: Feb 10, 2019, 16:02:35.479 hrs.

This period of 31 days has 2,678,400,000 milliseconds.

Now assume that the subscription is changed to plan B on Feb 1:

Subscription change timestamp is: Feb 1, 2019, 10:03:43.223 hrs.

The remaining term duration ( R ) is therefore: 9 days, 5 hrs, 58 min, 52 s and 257 ms. = 799,132,257 ms.

So credits for the unused period: (Price per millisecond for Plan A) x R = (1000 ÷ 2,678,400,000) x 799,132,257 = $298.36
Charges for the subscription change would be: (Price per millisecond for Plan B) x R = (2700 ÷ 2,678,400,000) x 799,132,257 = $805.58

So net charge for the subscription change would be: 805.58 - 298.36 = $507.22


FAQs 

Can I have products with different billing modes in Chargebee?

No, billing mode is a site-wide setting and cannot be changed for specific plans or addons in Chargebee.


Was this article helpful?
Loading…