POST /v1/invoices/{invoice}/lines/{line_item_id}
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.
Servers
- https://api.stripe.com/
Path parameters
Name | Type | Required | Description |
---|---|---|---|
invoice |
String | Yes |
Invoice ID of line item |
line_item_id |
String | Yes |
Invoice line item ID |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
discounts |
No |
The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. |
|
pricing |
Object | No |
The pricing information for the invoice item. |
pricing.price |
String | No | |
description |
String | No |
An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. |
tax_amounts |
No |
A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has tax_rates or if the invoice has default_tax_rates or uses automatic tax. Pass an empty string to remove previously defined tax amounts. |
|
tax_rates |
No |
The tax rates which apply to the line item. When set, the |
|
period |
Object | No |
The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have Stripe Revenue Recognition enabled, the period will be used to recognize and defer revenue. See the Revenue Recognition documentation for details. |
period.end |
Integer | Yes | |
period.start |
Integer | Yes | |
amount |
Integer | No |
The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. |
discountable |
Boolean | No |
Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. |
expand[] |
Array | No |
Specifies which fields in the response should be expanded. |
price_data |
Object | No |
Data used to generate a new Price object inline. |
price_data.unit_amount |
Integer | No | |
price_data.unit_amount_decimal |
String | No | |
price_data.product |
String | No | |
price_data.tax_behavior |
String | No |
Possible values:
|
price_data.currency |
String | Yes | |
price_data.product_data |
Object | No | |
price_data.product_data.name |
String | Yes | |
price_data.product_data.description |
String | No | |
price_data.product_data.tax_code |
String | No | |
price_data.product_data.images[] |
Array | No | |
price_data.product_data.metadata |
Object | No | |
quantity |
Integer | No |
Non-negative integer. The quantity of units for the line item. |
metadata |
No |
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.