Skip to content

Stripe: Invoiceitems schemas

10 Stripe schemas with complete fields and constraints.

← Invoiceitems operations · All schemas

Create an invoice item — request body — body period

FieldTypePresenceDescription and constraints
$objectRootThe 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://docs.stripe.com/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
endintegerRequired within parentFormat: unix-time
startintegerRequired within parentFormat: unix-time

Create an invoice item — response body

FieldTypePresenceDescription and constraints
$objectRootInvoice Items represent the component lines of an [invoice](https://docs.stripe.com/api/invoices). When you create an invoice item with an `invoice` field, it is attached to the specified invoice and included as [an invoice line item](https://docs.stripe.com/api/invoices/line_item) within [invoice.lines](https://docs.stripe.com/api/invoices/object#invoice_object-lines).

Invoice Items can be created before you are ready to actually send the invoice. This can be particularly useful when combined
with a [subscription](https://docs.stripe.com/api/subscriptions). Sometimes you want to add a charge or credit to a customer, but actually charge
or credit the customer's card only at the end of a regular billing cycle. This is useful for combining several charges
(to minimize per-transaction fees), or for having Stripe tabulate your usage-based billing totals.

Related guides: [Integrate with the Invoicing API](https://docs.stripe.com/invoicing/integration), [Subscription Invoices](https://docs.stripe.com/billing/invoices/subscription#adding-upcoming-invoice-items).
amountJSONRequired within parent
amount (anyOf 1)integerAlternativeAmount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
currencystringRequired within parentThree-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).
Format: currency
customerJSONRequired within parentThe ID of the customer to bill for this invoice item.
customer (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer (anyOf 3)ModelAlternativeExpand Delete a customer — response body
customer_accountJSONOptional
customer_account (anyOf 1)stringAlternativeThe ID of the account to bill for this invoice item.
Maximum length: 5000
customer_account (anyOf 2)nullAlternative
dateJSONRequired within parent
date (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
date (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
descriptionJSONOptional
description (anyOf 1)stringAlternativeAn arbitrary string attached to the object. Often useful for displaying to users.
Maximum length: 5000
description (anyOf 2)nullAlternative
discountablebooleanRequired within parentIf true, discounts will apply to this invoice item. Always false for prorations.
discountsJSONOptional
discounts (anyOf 1)arrayAlternativeThe discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
discounts (anyOf 1)[]JSONEach item
discounts (anyOf 1)[] (anyOf 1)stringAlternativeMaximum length: 5000
discounts (anyOf 1)[] (anyOf 2)ModelAlternativeExpand Get Customers Customer Discount — response body
discounts (anyOf 2)nullAlternative
frozen_fieldsarrayOptionalArray of field names that can't be modified. Attempting to update a frozen field returns an error.
frozen_fields[]stringEach itemKnown values: discounts, pricing, quantity
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
invoiceJSONOptional
invoice (anyOf 1)JSONAlternativeThe ID of the invoice this invoice item belongs to.
invoice (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
invoice (anyOf 1) (anyOf 2)ModelAlternativeExpand Pay an invoice — response body
invoice (anyOf 2)nullAlternative
invoicing_rulesarrayOptionalThe rules that control when this invoice item is eligible for invoicing. All rules must be satisfied for the item to be invoiced.
invoicing_rules[]ModelEach itemExpand Create an invoice item — response body — invoicing rules item
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataJSONOptional
metadata (anyOf 1)objectAlternativeSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keysMaximum length: 500
metadata (anyOf 2)nullAlternative
net_amountJSONOptional
net_amount (anyOf 1)integerAlternativeThe amount after discounts, but before credits and taxes. This field is `null` for `discountable=true` items.
net_amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: invoiceitem
parentJSONOptional
parent (anyOf 1)JSONAlternativeThe parent that generated this invoice item.
parent (anyOf 1) (anyOf 1)ModelAlternativeExpand Create an invoice item — response body — parent / The parent that generated this invoice item / type: subscription details
parent (anyOf 2)nullAlternative
periodModelRequired within parentExpand Create an invoice item — response body — period
pricingJSONOptional
pricing (anyOf 1)JSONAlternativeThe pricing information of the invoice item.
pricing (anyOf 1) (anyOf 1)ModelAlternativeExpand Update an invoice's line item — response body — pricing / The pricing information of the line item / type: price details
pricing (anyOf 2)nullAlternative
prorationbooleanRequired within parentWhether the invoice item was created automatically as a proration adjustment when the customer switched plans.
proration_detailsModelOptionalExpand Create an invoice item — response body — proration details
quantityJSONRequired within parent
quantity (anyOf 1)integerAlternativeQuantity 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 (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
quantity_decimalstringRequired within parentNon-negative decimal with at most 12 decimal places. The quantity of units for the invoice item.
Format: decimal
tax_ratesJSONOptional
tax_rates (anyOf 1)arrayAlternativeThe 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_rates (anyOf 1)[]ModelEach itemExpand Create a tax rate — response body
tax_rates (anyOf 2)nullAlternative
test_clockJSONOptional
test_clock (anyOf 1)JSONAlternativeID of the test clock this invoice item belongs to.
test_clock (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
test_clock (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a test clock — response body
test_clock (anyOf 2)nullAlternative

Referenced models: Create an invoice item — response body — parent / The parent that generated this invoice item / type: subscription details, Update an invoice's line item — response body — pricing / The pricing information of the line item / type: price details, Create a customer — response body, Delete a customer — response body, Get Customers Customer Discount — response body, Pay an invoice — response body, Create an invoice item — response body — period, Create an invoice item — response body — invoicing rules item, Create an invoice item — response body — proration details, Create a tax rate — response body, Create a test clock — response body

Create an invoice item — response body — invoicing rules item

FieldTypePresenceDescription and constraints
$objectRoot
typestringRequired within parentThe type of invoicing rule.
Known values: defer_until_credited_items_resolved

Create an invoice item — response body — parent / The parent that generated this invoice item / type: subscription details

FieldTypePresenceDescription and constraints
$objectRoot
subscription_detailsJSONOptional
subscription_details (anyOf 1)JSONAlternativeDetails about the subscription that generated this invoice item
subscription_details (anyOf 1) (anyOf 1)ModelAlternativeExpand Create an invoice item — response body — parent / The parent that generated this invoice item / type: subscription details subscription details value subscription, subscription item
subscription_details (anyOf 2)nullAlternative
typestringRequired within parentThe type of parent that generated this invoice item
Known values: subscription_details

Referenced models: Create an invoice item — response body — parent / The parent that generated this invoice item / type: subscription details subscription details value subscription, subscription item

Create an invoice item — response body — parent / The parent that generated this invoice item / type: subscription details subscription details value subscription, subscription item

FieldTypePresenceDescription and constraints
$objectRoot
subscriptionstringRequired within parentThe subscription that generated this invoice item
Maximum length: 5000
subscription_itemstringOptionalThe subscription item that generated this invoice item
Maximum length: 5000

Create an invoice item — response body — period

FieldTypePresenceDescription and constraints
$objectRoot
endJSONRequired within parent
end (anyOf 1)integerAlternativeThe end of the period, which must be greater than or equal to the start. This value is inclusive.
Format: unix-time
end (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
startJSONRequired within parent
start (anyOf 1)integerAlternativeThe start of the period. This value is inclusive.
Format: unix-time
start (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Create an invoice item — response body — proration details

FieldTypePresenceDescription and constraints
$objectRoot
credited_itemsJSONOptional
credited_items (anyOf 1)JSONAlternativeFor a credit proration, links to the debit invoice line items or invoice item that the credit applies to.
credited_items (anyOf 1) (anyOf 1)ModelAlternativeExpand Create an invoice item — response body — proration_details / credited_items / value / type: invoice item, invoice line items
credited_items (anyOf 2)nullAlternative
discount_amountsarrayRequired within parentDiscount amounts applied when the proration was created. This field is only populated for prorations created from subscriptions with `billing_mode=flexible`.
discount_amounts[]ModelEach itemExpand Void a credit note — response body — discount amounts item

Referenced models: Void a credit note — response body — discount amounts item, Create an invoice item — response body — proration_details / credited_items / value / type: invoice item, invoice line items

Create an invoice item — response body — proration_details / credited_items / value / type: invoice item, invoice line items

FieldTypePresenceDescription and constraints
$objectRoot
invoice_itemstringOptionalWhen `type` is `invoice_item`, the invoice item id for the debited invoice item corresponding to this credit proration.
Maximum length: 5000
invoice_line_item_detailsModelOptionalExpand Create an invoice item — response body — proration_details / credited_items / value / type: invoice item, invoice line items invoice line item details
typestringRequired within parentWhether the credit references a pending invoice item or one or more invoice line items on an invoice.
Known values: invoice_item, invoice_line_items

Referenced models: Create an invoice item — response body — proration_details / credited_items / value / type: invoice item, invoice line items invoice line item details

Create an invoice item — response body — proration_details / credited_items / value / type: invoice item, invoice line items invoice line item details

FieldTypePresenceDescription and constraints
$objectRoot
invoicestringRequired within parentThe invoice id for the debited line item(s).
Maximum length: 5000
invoice_line_itemsarrayRequired within parentIDs of the debited invoice line item(s) on the invoice that correspond to the credit proration.
invoice_line_items[]stringEach itemMaximum length: 5000

Delete an invoice item — response body

FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: invoiceitem

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.