HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
Product Docs

Decimal pricing

Decimal pricing lets you set usage add-on prices with up to nine decimal places — so businesses charging fractions of a cent per unit can bill accurately without rounding errors at the unit level.

  Available on all Recurly plans

Definition

Decimal pricing is a pricing method for businesses that need non-integer unit prices. Instead of rounding prices to the nearest cent at configuration time, you define a precise per-unit cost — up to nine decimal places — and Recurly calculates the invoice total by multiplying usage by that unit price, rounding only the final line item to the currency's supported precision. For example, a video streaming company charging $0.005 per GB sets that exact price, and the total is computed correctly regardless of how much data a customer consumes.

Key benefits

Precise, flexible pricing Support diverse consumption patterns with fractional unit prices — so every customer is charged accurately for exactly what they use.
Accurate charge calculation Rounding happens at the invoice line item total, not the unit price — keeping calculations transparent and correct for both customers and finance teams.
Broad integration compatibility Decimal pricing works across fixed, tiered, volume, and stairstep pricing models, and passes through to supported integration partners.

Key details

Plans and subscriptions

Decimal pricing is applied through usage add-ons, created via the Admin Console, the V3 API (2021-02-25), or the V2 API.

When setting pricing via the API, use the unit_amount_decimal field. Decimal pricing supports up to nine decimal places across fixed, tiered, volume, and stairstep pricing models. When unit_amount_decimal is provided, unit_amount is automatically set to null. A plan's predefined prices are used by default when creating a subscription, but you can override them per subscription as needed.

Invoices

Invoice line item totals are rounded to the decimal precision supported by the currency. The unit_amount_decimal value is displayed on the invoice. In API responses, the decimal price is stored in unit_amount_decimalunit_amount will be null.

Refunds

Recurly limits refunds to the invoice amount to prevent over-refunding. Line-item refunds are recommended for clarity on which products are being refunded. For open-amount refunds with decimal pricing, Recurly rounds the amount and refundable quantity to stay within the remaining refundable amount — this may cause minor per-unit discrepancies, but prevents over-refunding.

Emails

The unit_amount_decimal value is automatically mapped to the unit_amount parameter in email templates. If your templates already display invoice line items, they'll work correctly with decimal pricing without any changes.

Exports

The following exports include a unit_amount_decimal column when decimal pricing is in use:

  • Subscription Add-Ons
  • Subscription Add-Ons History
  • Subscription Add-Ons Usage

Webhooks

Subscription notifications include a unit_amount_in_decimal_cents value when decimal pricing is active. The unit_amount field will be null in these cases.

Set up decimal pricing

Legacy site requirement

If your Recurly site was created on or before May 7, 2018, you must enable Credit Invoices and Only Bill What Changed before using decimal pricing. Both settings are available on the Invoice Settings page.

1

Enable required features (legacy sites only)

For sites created on or before May 7, 2018: navigate to Invoice Settings and enable Credit Invoices and Only Bill What Changed.

2

Create a usage add-on

In the Admin Console or via the V3 API, create the usage add-on where you want to apply decimal pricing.

3

Set the decimal unit price

When configuring pricing via the API, use the unit_amount_decimal parameter to specify your per-unit price. The unit_amount field will be set to null automatically.

4

Confirm plan prices

Review the plan's predefined prices and adjust any subscription-level overrides as needed.

5

Monitor and refine

After go-live, review invoices and exports to confirm charges are calculating as expected. Adjust unit prices based on usage analytics and customer feedback.

Integration support

IntegrationDecimal support
XeroSupports up to four decimal places for unit price. Prices may round to two decimal places in Xero's display, but the line item total charge is always correct.
QuickBooks OnlineSupports up to seven decimal places. The line item total charge is always correct, though the displayed unit price is limited by QuickBooks Online's precision.
NetSuiteDoes not currently support decimal pricing. Contact [email protected] if this is a requirement for your business.