Multi-decimal Support 

Overview 

Accurate calculation of your product pricing based on the quantities purchased is important while billing your customers. When you want to charge your customers in fractional amounts, or when you want to charge for fractional quantities, Chargebee allows configuring your product pricing and units with a maximum of two decimal places, by default. When you want to use more than two decimals places, you end-up overcharging or undercharging your customers by rounding-off to the default settings.

For example, businesses in the telecommunication domain may want to track data consumption in multiple decimals like 1245.3587 MB and the pricing could be $0.015 per MB. Inaccurate billing in the absence of multiple decimal support can lead to considerable deficit in your company's overall revenue.

The multi-decimal support feature helps you avoid compromising your price and unit values, and ensures more accurate billing. With multi-decimal pricing enabled, you can use upto 20 decimal places while specifying the price and units for your plans and addons.

The product price and units with multiple decimal places as configured are considered in their entirety for invoice amount computation, tax application, reporting, and other third-party integrations.

Configuring Multi-decimal Support 

To configure multiple decimal pricing in your Chargebee site, follow these steps:

  1. Click Settings > Configure Chargebee > Billing LogIQ > Multi-decimal support.

  2. In the Multi-decimal support page, click Enable to set up multiple decimal pricing.

  3. Under Pricing Length, select the number of decimal places for price from the drop down. You can select up to 20 decimal places.

  4. Under Quantity Length, select the number of decimal places for the quantity from the drop down. You can select up to 20 decimal places.

  5. Click Publish.

Note:

  • Once you select the number of decimal places for price and units and publish the settings, you can not go back to select a lesser number of decimal places.
  • For example, if you have initially set the decimal place as 5 and if you try to update it to 2, this operation will fail and displays an error message since the selected value is lesser than the initially set decimal place.

After the setting is enabled, you can start specifying the quantity and price values for your plans and addons in multiple decimal places, with the number specified in the above settings being the upper limit. For example, when you specify 10 decimal places to be the Pricing and Quantity lengths, you can define the price or quantity value with any number of decimal places upto 10.

While creating a new plan/addon or updating an existing plan/addon, you can specify the units value and the price in multiple decimals based on the number of decimal places that you have configured.

When a subscription is created, the price and quantity reflects multiple decimal values as defined for the plan/addon. You can also override this value, at the time of creating or changing the subscription.

Similarly, your customer facing essentials such as emails, invoices, quotes, and so on display the product price and quantity in multiple decimal places. The line item amounts are however rounded off to their currency precision. Learn more about the rounding logic for line item amounts.

Rounding Logic for Line Item Amounts 

When multi-decimal support is enabled, the decimal places of your plan/addon price and quantities are considered in their entirety for line item amount and tax computation. However, these line item amount and tax amount that are derived after price computation are displayed, rounded off to zero or two decimal places based on the currency format.

Here is an example of how rounding logic works:

Consider a plan that is priced at 4.4556 per unit.

When the total quantity subscribed for is 10.625, the invoice amount is calculated as follows:

Plan Price 4.4556 X Quantity subscribed 10.625 = Line item amount computed 47.34075

  • When the plan currency is USD, the line item amount 47.34075 is rounded off to two decimal places, and gets displayed as $47.34. This is as per the currency format of USD that supports 2 decimal places.
  • When the plan currency is Japanese Yen (JPY), the line item amount 47.34075 is rounded off to zero decimal places, and gets displayed as JPY 47.

The same rounding logic is applied for credit notes and quotes. The line item amount and tax amount are rounded off to their currency precision.

Note
  • Once Multi-decimal support is enabled for your Chargebee site, you cannot disable it.
  • The setup cost for a plan cannot be defined in multiple decimals.

Refined Zero Truncation Logic for Enhanced Clarity 

Customers can experience improved functionality when utilizing multi-decimal support for displaying unit prices and quantities, regardless of whether they use a UBB solution. The enhancement involves truncating trailing zeroes after two decimal places. This practice is commonly employed to achieve a more concise and aesthetically pleasing number format. Notably, this adjustment exclusively impacts the visual representation of invoices, invoice details, credit notes, and quotes.

For example,

The zeros in this number, $143.000000000000, do not add value and lack clarity. This modification is essential to improve the presentation for end customers without introducing inconsistencies.

It is important to note that this truncation does not apply if non-zero digits follow the decimal point, as illustrated by the number 1.2300000033.

Was this article helpful?
Loading…