{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/stripe/main/json-schema/stripe-post-invoice-items-request-schema.json", "title": "PostInvoice_ItemsRequest", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/stripe-invoice-api-openapi.yml#/components/schemas/PostInvoice_ItemsRequest", "type": "object", "required": [ "customer" ], "properties": { "amount": { "description": "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.", "type": "integer" }, "currency": { "description": "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).", "type": "string" }, "customer": { "description": "The ID of the customer who will be billed when this invoice item is billed.", "maxLength": 5000, "type": "string" }, "description": { "description": "An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.", "maxLength": 5000, "type": "string" }, "discountable": { "description": "Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.", "type": "boolean" }, "discounts": { "anyOf": [ { "items": { "properties": { "coupon": { "maxLength": 5000, "type": "string" }, "discount": { "maxLength": 5000, "type": "string" } }, "title": "discounts_data_param", "type": "object" }, "type": "array" }, { "enum": [ "" ], "type": "string" } ], "description": "The coupons to redeem into discounts for the invoice item or invoice line item." }, "expand": { "description": "Specifies which fields in the response should be expanded.", "items": { "maxLength": 5000, "type": "string" }, "type": "array" }, "invoice": { "description": "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.", "maxLength": 5000, "type": "string" }, "metadata": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "enum": [ "" ], "type": "string" } ], "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`." }, "period": { "description": "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](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.", "properties": { "end": { "format": "unix-time", "type": "integer" }, "start": { "format": "unix-time", "type": "integer" } }, "required": [ "end", "start" ], "title": "period", "type": "object" }, "price": { "description": "The ID of the price object.", "maxLength": 5000, "type": "string" }, "price_data": { "description": "Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.", "properties": { "currency": { "type": "string" }, "product": { "maxLength": 5000, "type": "string" }, "tax_behavior": { "enum": [ "exclusive", "inclusive", "unspecified" ], "type": "string" }, "unit_amount": { "type": "integer" }, "unit_amount_decimal": { "format": "decimal", "type": "string" } }, "required": [ "currency", "product" ], "title": "one_time_price_data", "type": "object" }, "quantity": { "description": "Non-negative integer. The quantity of units for the invoice item.", "type": "integer" }, "subscription": { "description": "The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be 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.", "maxLength": 5000, "type": "string" }, "tax_behavior": { "description": "Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) 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.", "enum": [ "exclusive", "inclusive", "unspecified" ], "type": "string" }, "tax_code": { "anyOf": [ { "type": "string" }, { "enum": [ "" ], "type": "string" } ], "description": "A [tax code](https://stripe.com/docs/tax/tax-categories) ID." }, "tax_rates": { "description": "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.", "items": { "maxLength": 5000, "type": "string" }, "type": "array" }, "unit_amount": { "description": "The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice.", "type": "integer" }, "unit_amount_decimal": { "description": "Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.", "format": "decimal", "type": "string" } } }