Skip to main content
Schema2020-08-27object

invoice

Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription. They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary). If your invoice is configured to be billed through automatic charges, Stripe automatically finalizes your invoice and attempts payment. Note that finalizing the invoice, [when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does not happen immediately as the invoice is created. Stripe waits until one hour after the last webhook was successfully sent (or the last webhook timed out after failing). If you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one hour after creation to finalize the invoice. If your invoice is configured to be billed by sending an email, then based on your [email settings](https://dashboard.stripe.com/account/billing/automatic), Stripe will email the invoice to your customer and await payment. These emails can contain a link to a hosted page to pay the invoice. Stripe applies any customer credit on the account before determining the amount due for the invoice (i.e., the amount that will be actually charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge per currency](/docs/currencies#minimum-and-maximum-charge-amounts), the invoice is automatically marked paid, and we add the amount due to the customer's credit balance which is applied to the next invoice. More details on the customer's credit balance are [here](https://stripe.com/docs/billing/customer/balance). Related guide: [Send Invoices to Customers](https://stripe.com/docs/billing/invoices/sending).

Source
openapi/spec3.json
Commit
d70de345383d
Active snapshot
da69df7e6e11

Invoice

object

Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription. They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary). If your invoice is configured to be billed through automatic charges, Stripe automatically finalizes your invoice and attempts payment. Note that finalizing the invoice, [when automatic](https://stripe.com…

account_country string
optionalnullable

The country of the business associated with this invoice, most often the business creating the invoice.

account_name string
optionalnullable

The public name of the business associated with this invoice, most often the business creating the invoice.

account_tax_ids array
optionalnullable

The account tax IDs associated with the invoice. Only editable when the invoice is a draft.

amount_due integer
required

Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.

amount_paid integer
required

The amount, in %s, that was paid.

amount_remaining integer
required

The amount remaining, in %s, that is due.

application_fee_amount integer
optionalnullable

The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid.

attempt_count integer
required

Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.

attempted boolean
required

Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.

auto_advance boolean
optional

Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action.

billing_reason string
optionalnullable

Indicates the reason why the invoice was created. `subscription_cycle` indicates an invoice created by a subscription advancing into a new period. `subscription_create` indicates an invoice created due to creating a subscription. `subscription_update` indicates an invoice created due to updating a subscription. `subscription` is set for all old invoices to indicate either a change to a subscription or a period advancement. `manual` is set for all invoices unrelated to a subscription (for example: created vi…

charge
optionalnullable

ID of the latest charge generated for this invoice, if any.

collection_method string
required

Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.

created integer (unix-time)
required

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

currency string
required

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).

custom_fields array
optionalnullable

Custom fields displayed on the invoice.

customer
optionalnullable

The ID of the customer who will be billed.

customer_address
optionalnullable

The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.

customer_email string
optionalnullable

The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.

customer_name string
optionalnullable

The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated.

customer_phone string
optionalnullable

The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated.

customer_shipping
optionalnullable

The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated.

customer_tax_exempt string
optionalnullable

The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated.

customer_tax_ids array
optionalnullable

The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated.

default_payment_method
optionalnullable

ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.

default_source
optionalnullable

ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.

default_tax_rates array
required

The tax rates applied to this invoice, if any.

description string
optionalnullable

An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.

discount
optionalnullable

Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.

discounts array
optionalnullable

The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.

due_date integer (unix-time)
optionalnullable

The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.

ending_balance integer
optionalnullable

Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.

footer string
optionalnullable

Footer displayed on the invoice.

hosted_invoice_url string
optionalnullable

The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.

id string
optional

Unique identifier for the object.

invoice_pdf string
optionalnullable

The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.

last_finalization_error
optionalnullable

The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.

lines InvoiceLinesList object
required

The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.

livemode boolean
required

Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

metadata object
optionalnullable

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.

next_payment_attempt integer (unix-time)
optionalnullable

The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.

number string
optionalnullable

A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.

object string
required

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

on_behalf_of
optionalnullable

The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.

paid boolean
required

Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.

payment_intent
optionalnullable

The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.

period_end integer (unix-time)
required

End of the usage period during which invoice items were added to this invoice.

period_start integer (unix-time)
required

Start of the usage period during which invoice items were added to this invoice.

post_payment_credit_notes_amount integer
required

Total amount of all post-payment credit notes issued for this invoice.

pre_payment_credit_notes_amount integer
required

Total amount of all pre-payment credit notes issued for this invoice.

quote
optionalnullable

The quote this invoice was generated from.

receipt_number string
optionalnullable

This is the transaction number that appears on email receipts sent for this invoice.

starting_balance integer
required

Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance.

statement_descriptor string
optionalnullable

Extra information about an invoice for the customer's credit card statement.

status string
optionalnullable

The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)

subscription
optionalnullable

The subscription that this invoice was prepared for, if any.

subscription_proration_date integer
optional

Only set for upcoming invoices that preview prorations. The time used to calculate prorations.

subtotal integer
required

Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated

tax integer
optionalnullable

The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.

total integer
required

Total after discounts and taxes.

total_discount_amounts array
optionalnullable

The aggregate amounts calculated per discount across all line items.

total_tax_amounts array
required

The aggregate amounts calculated per tax rate for all line items.

transfer_data
optionalnullable

The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.

webhooks_delivered_at integer (unix-time)
optionalnullable

Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.