v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-015891,4406.1 MB

Update an invoice's line item

Updates an invoice’s line item. Some fields, such as tax_amounts, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized.

post/v1/invoices/{invoice}/lines/{line_item_id}

Path parameters

invoicestring required

Invoice ID of line item

line_item_idstring required

Invoice line item ID

Response

Successful response.

amountinteger required

The amount, in cents (or local equivalent).

currencystring currency required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

descriptionstring nullable

An arbitrary string attached to the object. Often useful for displaying to users.

discountableboolean required

If true, discounts will apply to this line item. Always false for prorations.

idstring required

Unique identifier for the object.

invoicestring nullable

The ID of the invoice that contains this line item.

livemodeboolean required

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

metadataobject required

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with type=subscription, metadata reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.

object'line_item' required

String representing the object's type. Objects of the same type share the same value.

quantityinteger nullable

Quantity of units for the invoice line item in integer format, with any decimal precision truncated. For the line item's full-precision decimal quantity, use quantity_decimal. This field will be deprecated in favor of quantity_decimal in a future version. If the line item is a proration or subscription, the quantity of the subscription that the proration was computed for.

quantity_decimalstring decimal nullable

Non-negative decimal with at most 12 decimal places. The quantity of units for the line item.

subtotalinteger required

The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes.