POST /v1/invoiceitems

Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.

Servers

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 and promotion codes to redeem into discounts for the invoice item or invoice line item.

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.

subscription String No

The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.

tax_rates[] Array No

The tax rates which apply to the invoice item. When set, the default_tax_rates on the invoice do not apply to this invoice item.

tax_code No

A tax code ID.

expand[] Array No

Specifies which fields in the response should be expanded.

quantity Integer No

Non-negative integer. The quantity of units for the invoice 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 metadata.

currency String No

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

customer String Yes

The ID of the customer who will be billed when this invoice item is billed.

invoice String No

The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.

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
unit_amount_decimal String No

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.

amount Integer No

The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative amount will reduce the amount_due on the invoice.

discountable Boolean No

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

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 Yes
price_data.tax_behavior String No

Possible values:

  • "inclusive"
  • "unspecified"
  • "exclusive"
price_data.currency String Yes
tax_behavior String No

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.

Possible values:

  • "inclusive"
  • "unspecified"
  • "exclusive"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.