Update an invoice item

Changed on

Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.

post/v1/invoiceitems/{invoiceitem}

Request

  • Base URL: https://api.stripe.com
  • URL: https://api.stripe.com/v1/invoiceitems/{invoiceitem}
  • Auth: one of:
    • HTTP basic
    • HTTP bearer

Path parameters

invoiceitemstring required

Request body application/x-www-form-urlencoded

amountinteger

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.

descriptionstring

An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.

discountableboolean

Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.

expandstring[]

Specifies which fields in the response should be expanded.

invoicing_rules''

Pass an empty string to remove previously-defined invoicing rules. Setting invoicing rules is not supported.

quantityinteger

Non-negative integer. The quantity of units for the invoice item. Use quantity_decimal instead to provide decimal precision. This field will be deprecated in favor of quantity_decimal in a future version.

quantity_decimalstring decimal

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

tax_behavior'exclusive' | 'inclusive' | 'unspecified'

Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed.

unit_amount_decimalstring decimal

The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount_decimal will be multiplied by the quantity to get the full amount. Passing in a negative unit_amount_decimal will reduce the amount_due on the invoice. Accepts at most 12 decimal places.

Response

Successful response.

amountinteger required

Amount (in the currency specified) of the invoice item. This should always be equal to unit_amount * quantity.

currencystring currency required

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

customer_accountstring nullable

The ID of the account to bill for this invoice item.

dateinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

descriptionstring nullable

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

discountableboolean required

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

frozen_fieldsstring[]

Array of field names that can't be modified. Attempting to update a frozen field returns an error.

idstring required

Unique identifier for the object.

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 nullable

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.

net_amountinteger

The amount after discounts, but before credits and taxes. This field is null for discountable=true items.

object'invoiceitem' required

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

prorationboolean required

Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.

quantityinteger required

Quantity of units for the invoice item in integer format, with any decimal precision truncated. For the 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 invoice item is a proration, the quantity of the subscription that the proration was computed for.

quantity_decimalstring decimal required

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

Changes

    • warning

      added the new final_payment_failure enum value to the //////// response property for the response status

    • warning

      added the new first_payment_failure enum value to the //////// response property for the response status

    • info

      added the optional property ///// to the response with the status

Some revisions have not been checked yet.