Adds decimal quantity support for Invoice Items and Invoice Line Items
What’s new
Adds support for decimal quantities with up to 12 decimal places of precision when creating or updating Invoice Items and Invoice Line Items. The new quantity_decimal parameter accepts string values in decimal format.
The existing quantity property is now deprecated but still available. Stripe will remove quantity in a future breaking API version, so use only quantity_decimal for new integrations.
Impact
You can now create invoices with decimal quantities, enabling more accurate billing for scenarios such as invoicing for accrued usage, fractional hours of service, or partial units of products.
Because quantity is deprecated and will eventually be removed, update your code to use quantity_decimal instead.
Existing integrations using the quantity parameter will continue to work without changes until it’s removed, but it doesn’t support decimal values. If you set quantity_decimal, it automatically sets the quantity to the same value, truncated to an integer. For example, setting quantity_decimal to 5.7 sets quantity to 5.
A single request can set either quantity or quantity_decimal, but not both.
Changes
| Parameter | Change | Resources or endpoints |
|---|---|---|
| quantity_decimal | Added | Invoice#add_lines. lines[] Invoice#create_preview. invoice_items[] Invoice#update_lines. lines[] + 5 more InvoiceItem InvoiceItem#create InvoiceItem#update InvoiceLineItem InvoiceLineItem#update |
Upgrade
- View your current API version in Workbench.
- If you use an SDK, upgrade to the corresponding SDK version for this API version.
- If you don’t use an SDK, update your API requests to include Stripe-Version: 2026-03-25. dahlia
- Upgrade the API version used for webhook endpoints .
- Test your integration against the new version.
- If you use Connect, test your Connect integration .
- In Workbench, perform the upgrade . You can roll back the version for 72 hours.
Learn more about Stripe API upgrades.
