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, 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, 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, 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, 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.
Related guide: Send invoices to customers
Summary
Types
@type automatic_tax() :: %{ optional(:disabled_reason) => String.t() | nil, optional(:enabled) => boolean() | nil, optional(:liability) => automatic_tax_liability() | nil, optional(:provider) => String.t() | nil, optional(:status) => String.t() | nil, optional(String.t()) => term() }
disabled_reason- If Stripe disabled automatic tax, this enum describes why. Possible values:finalization_requires_location_inputs,finalization_system_error. Nullable.enabled- Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified tax rates, negative amounts, ortax_behavior=unspecified) cannot be added to automatic tax invoices.liability- The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. Nullable.provider- The tax provider powering automatic tax. Max length: 5000. Nullable.status- The status of the most recent automated tax calculation for this invoice. Possible values:complete,failed,requires_location_inputs. Nullable.
@type automatic_tax_liability() :: %{ optional(:account) => String.t() | Stripe.Resources.Account.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
account- The connected account being referenced whentypeisaccount.type- Type of the account referenced. Possible values:account,self.
@type confirmation_secret() :: %{ optional(:client_secret) => String.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
client_secret- The client_secret of the payment that Stripe creates for the invoice after finalization. Max length: 5000.type- The type of client_secret. Currently this is always payment_intent, referencing the default payment_intent that Stripe creates during invoice finalization Max length: 5000.
@type custom_fields() :: %{ optional(:name) => String.t() | nil, optional(:value) => String.t() | nil, optional(String.t()) => term() }
name- The name of the custom field. Max length: 5000.value- The value of the custom field. Max length: 5000.
@type customer_tax_ids() :: %{ optional(:type) => String.t() | nil, optional(:value) => String.t() | nil, optional(String.t()) => term() }
type- The type of the tax ID, one ofad_nrt,ar_cuit,eu_vat,bo_tin,br_cnpj,br_cpf,cn_tin,co_nit,cr_tin,do_rcn,ec_ruc,eu_oss_vat,hr_oib,pe_ruc,ro_tin,rs_pib,sv_nit,uy_ruc,ve_rif,vn_tin,gb_vat,nz_gst,au_abn,au_arn,in_gst,no_vat,no_voec,za_vat,ch_vat,mx_rfc,sg_uen,ru_inn,ru_kpp,ca_bn,hk_br,es_cif,pl_nip,tw_vat,th_vat,jp_cn,jp_rn,jp_trn,li_uid,li_vat,my_itn,us_ein,kr_brn,ca_qst,ca_gst_hst,ca_pst_bc,ca_pst_mb,ca_pst_sk,my_sst,sg_gst,ae_trn,cl_tin,sa_vat,id_npwp,my_frp,il_vat,ge_vat,ua_vat,is_vat,bg_uic,hu_tin,si_tin,ke_pin,tr_tin,eg_tin,ph_tin,al_tin,bh_vat,kz_bin,ng_tin,om_vat,de_stn,ch_uid,tz_vat,uz_vat,uz_tin,md_vat,ma_vat,by_tin,ao_tin,bs_tin,bb_tin,cd_nif,mr_nif,me_pib,zw_tin,ba_tin,gn_nif,mk_vat,sr_fin,sn_ninea,am_tin,np_pan,tj_tin,ug_tin,zm_tin,kh_tin,aw_tin,az_tin,bd_bin,bj_ifu,et_tin,kg_tin,la_tin,cm_niu,cv_nif,bf_ifu, orunknownPossible values:ad_nrt,ae_trn,al_tin,am_tin,ao_tin,ar_cuit,au_abn,au_arn,aw_tin,az_tin,ba_tin,bb_tin,bd_bin,bf_ifu,bg_uic,bh_vat,bj_ifu,bo_tin,br_cnpj,br_cpf,bs_tin,by_tin,ca_bn,ca_gst_hst,ca_pst_bc,ca_pst_mb,ca_pst_sk,ca_qst,cd_nif,ch_uid,ch_vat,cl_tin,cm_niu,cn_tin,co_nit,cr_tin,cv_nif,de_stn,do_rcn,ec_ruc,eg_tin,es_cif,et_tin,eu_oss_vat,eu_vat,gb_vat,ge_vat,gn_nif,hk_br,hr_oib,hu_tin,id_npwp,il_vat,in_gst,is_vat,jp_cn,jp_rn,jp_trn,ke_pin,kg_tin,kh_tin,kr_brn,kz_bin,la_tin,li_uid,li_vat,ma_vat,md_vat,me_pib,mk_vat,mr_nif,mx_rfc,my_frp,my_itn,my_sst,ng_tin,no_vat,no_voec,np_pan,nz_gst,om_vat,pe_ruc,ph_tin,pl_nip,ro_tin,rs_pib,ru_inn,ru_kpp,sa_vat,sg_gst,sg_uen,si_tin,sn_ninea,sr_fin,sv_nit,th_vat,tj_tin,tr_tin,tw_vat,tz_vat,ua_vat,ug_tin,unknown,us_ein,uy_ruc,uz_tin,uz_vat,ve_rif,vn_tin,za_vat,zm_tin,zw_tin.value- The value of the tax ID. Max length: 5000. Nullable.
@type from_invoice() :: %{ optional(:action) => String.t() | nil, optional(:invoice) => String.t() | t() | nil, optional(String.t()) => term() }
action- The relation between this invoice and the cloned invoice Max length: 5000.invoice- The invoice that was cloned.
@type issuer() :: %{ optional(:account) => String.t() | Stripe.Resources.Account.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
account- The connected account being referenced whentypeisaccount.type- Type of the account referenced. Possible values:account,self.
@type lines() :: %{ optional(:data) => [Stripe.Resources.InvoiceLineItem.t()] | nil, optional(:has_more) => boolean() | nil, optional(:object) => String.t() | nil, optional(:url) => String.t() | nil, optional(String.t()) => term() }
data- Details about each object.has_more- True if this list has another page of items after this one that can be fetched.object- String representing the object's type. Objects of the same type share the same value. Always has the valuelist. Possible values:list.url- The URL where this list can be accessed. Max length: 5000.
@type parent() :: %{ optional(:quote_details) => parent_quote_details() | nil, optional(:subscription_details) => parent_subscription_details() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
quote_details- Details about the quote that generated this invoice Nullable.subscription_details- Details about the subscription that generated this invoice Nullable.type- The type of parent that generated this invoice Possible values:quote_details,subscription_details.
@type parent_quote_details() :: %{ optional(:quote) => String.t() | nil, optional(String.t()) => term() }
quote- The quote that generated this invoice Max length: 5000.
@type parent_subscription_details() :: %{ optional(:metadata) => %{required(String.t()) => String.t()} | nil, optional(:subscription) => String.t() | Stripe.Resources.Subscription.t() | nil, optional(:subscription_proration_date) => integer() | nil, optional(String.t()) => term() }
metadata- Set of key-value pairs defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. Note: This attribute is populated only for invoices created on or after June 29, 2023. Nullable.subscription- The subscription that generated this invoicesubscription_proration_date- Only set for upcoming invoices that preview prorations. The time used to calculate prorations. Format: Unix timestamp.
@type payment_settings() :: %{ optional(:default_mandate) => String.t() | nil, optional(:payment_method_options) => payment_settings_payment_method_options() | nil, optional(:payment_method_types) => [String.t()] | nil, optional(String.t()) => term() }
default_mandate- ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. Max length: 5000. Nullable.payment_method_options- Payment-method-specific configuration to provide to the invoice’s PaymentIntent. Nullable.payment_method_types- The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your invoice template settings. Nullable.
@type payment_settings_payment_method_options() :: %{ optional(:acss_debit) => payment_settings_payment_method_options_acss_debit() | nil, optional(:bancontact) => payment_settings_payment_method_options_bancontact() | nil, optional(:card) => payment_settings_payment_method_options_card() | nil, optional(:customer_balance) => payment_settings_payment_method_options_customer_balance() | nil, optional(:konbini) => map() | nil, optional(:payto) => payment_settings_payment_method_options_payto() | nil, optional(:sepa_debit) => map() | nil, optional(:us_bank_account) => payment_settings_payment_method_options_us_bank_account() | nil, optional(String.t()) => term() }
acss_debit- If paying byacss_debit, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. Nullable.bancontact- If paying bybancontact, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. Nullable.card- If paying bycard, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. Nullable.customer_balance- If paying bycustomer_balance, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. Nullable.konbini- If paying bykonbini, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. Nullable.payto- If paying bypayto, this sub-hash contains details about the PayTo payment method options to pass to the invoice’s PaymentIntent. Nullable.sepa_debit- If paying bysepa_debit, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. Nullable.us_bank_account- If paying byus_bank_account, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. Nullable.
@type payment_settings_payment_method_options_acss_debit() :: %{ optional(:mandate_options) => payment_settings_payment_method_options_acss_debit_mandate_options() | nil, optional(:verification_method) => String.t() | nil, optional(String.t()) => term() }
mandate_optionsverification_method- Bank account verification method. Possible values:automatic,instant,microdeposits.
@type payment_settings_payment_method_options_acss_debit_mandate_options() :: %{ optional(:transaction_type) => String.t() | nil, optional(String.t()) => term() }
transaction_type- Transaction type of the mandate. Possible values:business,personal. Nullable.
@type payment_settings_payment_method_options_bancontact() :: %{ optional(:preferred_language) => String.t() | nil, optional(String.t()) => term() }
preferred_language- Preferred language of the Bancontact authorization page that the customer is redirected to. Possible values:de,en,fr,nl.
@type payment_settings_payment_method_options_card() :: %{ optional(:installments) => payment_settings_payment_method_options_card_installments() | nil, optional(:request_three_d_secure) => String.t() | nil, optional(String.t()) => term() }
installmentsrequest_three_d_secure- We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and other requirements. However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on manually requesting 3D Secure for more information on how this configuration interacts with Radar and our SCA Engine. Possible values:any,automatic,challenge. Nullable.
@type payment_settings_payment_method_options_card_installments() :: %{ optional(:enabled) => boolean() | nil, optional(String.t()) => term() }
enabled- Whether Installments are enabled for this Invoice. Nullable.
@type payment_settings_payment_method_options_customer_balance() :: %{ optional(:bank_transfer) => payment_settings_payment_method_options_customer_balance_bank_transfer() | nil, optional(:funding_type) => String.t() | nil, optional(String.t()) => term() }
bank_transferfunding_type- The funding method type to be used when there are not enough funds in the customer balance. Permitted values include:bank_transfer. Possible values:bank_transfer. Nullable.
@type payment_settings_payment_method_options_customer_balance_bank_transfer() :: %{ optional(:eu_bank_transfer) => payment_settings_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
eu_bank_transfertype- The bank transfer type that can be used for funding. Permitted values include:eu_bank_transfer,gb_bank_transfer,jp_bank_transfer,mx_bank_transfer, orus_bank_transfer. Nullable.
@type payment_settings_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer() :: %{ optional(:country) => String.t() | nil, optional(String.t()) => term() }
country- The desired country code of the bank account information. Permitted values include:BE,DE,ES,FR,IE, orNL. Possible values:BE,DE,ES,FR,IE,NL.
@type payment_settings_payment_method_options_payto() :: %{ optional(:mandate_options) => payment_settings_payment_method_options_payto_mandate_options() | nil, optional(String.t()) => term() }
mandate_options
@type payment_settings_payment_method_options_payto_mandate_options() :: %{ optional(:amount) => integer() | nil, optional(:amount_type) => String.t() | nil, optional(:purpose) => String.t() | nil, optional(String.t()) => term() }
amount- The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. Nullable.amount_type- Onlymaximumis supported. Possible values:fixed,maximum. Nullable.purpose- The purpose for which payments are made. Has a default value based on your merchant category code. Possible values:dependant_support,government,loan,mortgage,other,pension,personal,retail,salary,tax,utility. Nullable.
@type payment_settings_payment_method_options_us_bank_account() :: %{ optional(:financial_connections) => payment_settings_payment_method_options_us_bank_account_financial_connections() | nil, optional(:verification_method) => String.t() | nil, optional(String.t()) => term() }
financial_connectionsverification_method- Bank account verification method. Possible values:automatic,instant,microdeposits.
@type payment_settings_payment_method_options_us_bank_account_financial_connections() :: %{ optional(:filters) => payment_settings_payment_method_options_us_bank_account_financial_connections_filters() | nil, optional(:permissions) => [String.t()] | nil, optional(:prefetch) => [String.t()] | nil, optional(String.t()) => term() }
filterspermissions- The list of permissions to request. Thepayment_methodpermission must be included.prefetch- Data features requested to be retrieved upon account creation. Nullable.
@type payment_settings_payment_method_options_us_bank_account_financial_connections_filters() :: %{ optional(:account_subcategories) => [String.t()] | nil, optional(String.t()) => term() }
account_subcategories- The account subcategories to use to filter for possible accounts to link. Valid subcategories arecheckingandsavings.
@type payments() :: %{ optional(:data) => [Stripe.Resources.InvoicePayment.t()] | nil, optional(:has_more) => boolean() | nil, optional(:object) => String.t() | nil, optional(:url) => String.t() | nil, optional(String.t()) => term() }
data- Details about each object.has_more- True if this list has another page of items after this one that can be fetched.object- String representing the object's type. Objects of the same type share the same value. Always has the valuelist. Possible values:list.url- The URL where this list can be accessed. Max length: 5000.
@type rendering() :: %{ optional(:amount_tax_display) => String.t() | nil, optional(:pdf) => rendering_pdf() | nil, optional(:template) => String.t() | nil, optional(:template_version) => integer() | nil, optional(String.t()) => term() }
amount_tax_display- How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. Max length: 5000. Nullable.pdf- Invoice pdf rendering options Nullable.template- ID of the rendering template that the invoice is formatted by. Max length: 5000. Nullable.template_version- Version of the rendering template that the invoice is using. Nullable.
@type rendering_pdf() :: %{ optional(:page_size) => String.t() | nil, optional(String.t()) => term() }
page_size- Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. Possible values:a4,auto,letter. Nullable.
@type shipping_cost() :: %{ optional(:amount_subtotal) => integer() | nil, optional(:amount_tax) => integer() | nil, optional(:amount_total) => integer() | nil, optional(:shipping_rate) => String.t() | Stripe.Resources.ShippingRate.t() | nil, optional(:taxes) => [shipping_cost_taxes()] | nil, optional(String.t()) => term() }
amount_subtotal- Total shipping cost before any taxes are applied.amount_tax- Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.amount_total- Total shipping cost after taxes are applied.shipping_rate- The ID of the ShippingRate for this invoice. Nullable.taxes- The taxes applied to the shipping rate.
@type shipping_cost_taxes() :: %{ optional(:amount) => integer() | nil, optional(:rate) => Stripe.Resources.TaxRate.t() | nil, optional(:taxability_reason) => String.t() | nil, optional(:taxable_amount) => integer() | nil, optional(String.t()) => term() }
amount- Amount of tax applied for this rate.ratetaxability_reason- The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. Possible values:customer_exempt,not_collecting,not_subject_to_tax,not_supported,portion_product_exempt,portion_reduced_rated,portion_standard_rated,product_exempt,product_exempt_holiday,proportionally_rated,reduced_rated,reverse_charge,standard_rated,taxable_basis_reduced,zero_rated. Nullable.taxable_amount- The amount on which tax is calculated, in cents (or local equivalent). Nullable.
@type status_transitions() :: %{ optional(:finalized_at) => integer() | nil, optional(:marked_uncollectible_at) => integer() | nil, optional(:paid_at) => integer() | nil, optional(:voided_at) => integer() | nil, optional(String.t()) => term() }
finalized_at- The time that the invoice draft was finalized. Format: Unix timestamp. Nullable.marked_uncollectible_at- The time that the invoice was marked uncollectible. Format: Unix timestamp. Nullable.paid_at- The time that the invoice was paid. Format: Unix timestamp. Nullable.voided_at- The time that the invoice was voided. Format: Unix timestamp. Nullable.
@type t() :: %Stripe.Resources.Invoice{ account_country: String.t(), account_name: String.t(), account_tax_ids: [String.t() | Stripe.Resources.TaxId.t()], amount_due: integer(), amount_overpaid: integer(), amount_paid: integer(), amount_remaining: integer(), amount_shipping: integer(), application: String.t() | Stripe.Resources.Application.t(), attempt_count: integer(), attempted: boolean(), auto_advance: boolean() | nil, automatic_tax: automatic_tax(), automatically_finalizes_at: integer(), billing_reason: String.t(), collection_method: String.t(), confirmation_secret: confirmation_secret() | nil, created: integer(), currency: String.t(), custom_fields: [custom_fields()], customer: String.t() | Stripe.Resources.Customer.t(), customer_account: String.t(), customer_address: Stripe.Resources.Address.t(), customer_email: String.t(), customer_name: String.t(), customer_phone: String.t(), customer_shipping: Stripe.Resources.ShippingDetails.t(), customer_tax_exempt: String.t(), customer_tax_ids: [customer_tax_ids()] | nil, default_payment_method: String.t() | Stripe.Resources.PaymentMethod.t(), default_source: String.t() | Stripe.Resources.PaymentSource.t(), default_tax_rates: [Stripe.Resources.TaxRate.t()], description: String.t(), discounts: [String.t() | Stripe.Resources.Discount.t()], due_date: integer(), effective_at: integer(), ending_balance: integer(), footer: String.t(), from_invoice: from_invoice(), hosted_invoice_url: String.t() | nil, id: String.t() | nil, invoice_pdf: String.t() | nil, issuer: issuer(), last_finalization_error: Stripe.Resources.StripeError.t(), latest_revision: String.t() | t(), lines: lines(), livemode: boolean(), metadata: %{required(String.t()) => String.t()}, next_payment_attempt: integer(), number: String.t(), object: String.t(), on_behalf_of: String.t() | Stripe.Resources.Account.t(), parent: parent(), payment_settings: payment_settings(), payments: payments() | nil, period_end: integer(), period_start: integer(), post_payment_credit_notes_amount: integer(), pre_payment_credit_notes_amount: integer(), receipt_number: String.t(), rendering: rendering(), shipping_cost: shipping_cost(), shipping_details: Stripe.Resources.ShippingDetails.t(), starting_balance: integer(), statement_descriptor: String.t(), status: String.t(), status_transitions: status_transitions(), subscription: String.t() | Stripe.Resources.Subscription.t() | nil, subtotal: integer(), subtotal_excluding_tax: integer(), test_clock: String.t() | Stripe.Resources.TestHelpers.TestClock.t(), threshold_reason: threshold_reason() | nil, total: integer(), total_discount_amounts: [total_discount_amounts()], total_excluding_tax: integer(), total_pretax_credit_amounts: [total_pretax_credit_amounts()], total_taxes: [total_taxes()], webhooks_delivered_at: integer() }
account_country- The country of the business associated with this invoice, most often the business creating the invoice. Max length: 5000. Nullable.account_name- The public name of the business associated with this invoice, most often the business creating the invoice. Max length: 5000. Nullable.account_tax_ids- The account tax IDs associated with the invoice. Only editable when the invoice is a draft. Nullable. Expandable.amount_due- 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, theamount_duemay be 0. If there is a positivestarting_balancefor the invoice (the customer owes money), theamount_duewill also take that into account. The charge that gets generated for the invoice will be for the amount specified inamount_due.amount_overpaid- Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.amount_paid- The amount, in cents (or local equivalent), that was paid.amount_remaining- The difference between amount_due and amount_paid, in cents (or local equivalent).amount_shipping- This is the sum of all the shipping amounts.application- ID of the Connect Application that created the invoice. Nullable. Expandable.attempt_count- 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. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.attempted- Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after theinvoice.createdwebhook, for example, so you might not want to display that invoice as unpaid to your users.auto_advance- Controls whether Stripe performs automatic collection of the invoice. Iffalse, the invoice's state doesn't automatically advance without an explicit action.automatic_tax- Expandable.automatically_finalizes_at- The time when this invoice is currently scheduled to be automatically finalized. The field will benullif the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always benull- seefinalized_atfor the time when an already-finalized invoice was finalized. Format: Unix timestamp. Nullable.billing_reason- Indicates the reason why the invoice was created.manual: Unrelated to a subscription, for example, created via the invoice editor.subscription: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.subscription_create: A new subscription was created.subscription_cycle: A subscription advanced into a new period.subscription_threshold: A subscription reached a billing threshold.subscription_update: A subscription was updated.upcoming: Reserved for upcoming invoices created through the Create Preview Invoice API or when aninvoice.upcomingevent is generated for an upcoming invoice on a subscription. Possible values:automatic_pending_invoice_item_invoice,manual,quote_accept,subscription,subscription_create,subscription_cycle,subscription_threshold,subscription_update,upcoming. Nullable.collection_method- Eithercharge_automatically, orsend_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. Possible values:charge_automatically,send_invoice.confirmation_secret- The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. Nullable. Expandable.created- Time at which the object was created. Measured in seconds since the Unix epoch. Format: Unix timestamp.currency- Three-letter ISO currency code, in lowercase. Must be a supported currency. Format: ISO 4217 currency code.custom_fields- Custom fields displayed on the invoice. Nullable. Expandable.customer- The ID of the customer to bill. Nullable. Expandable.customer_account- The ID of the account representing the customer to bill. Max length: 5000. Nullable.customer_address- The customer's address. Until the invoice is finalized, this field will equalcustomer.address. Once the invoice is finalized, this field will no longer be updated. Nullable. Expandable.customer_email- The customer's email. Until the invoice is finalized, this field will equalcustomer.email. Once the invoice is finalized, this field will no longer be updated. Max length: 5000. Nullable.customer_name- The customer's name. Until the invoice is finalized, this field will equalcustomer.name. Once the invoice is finalized, this field will no longer be updated. Max length: 5000. Nullable.customer_phone- The customer's phone number. Until the invoice is finalized, this field will equalcustomer.phone. Once the invoice is finalized, this field will no longer be updated. Max length: 5000. Nullable.customer_shipping- The customer's shipping information. Until the invoice is finalized, this field will equalcustomer.shipping. Once the invoice is finalized, this field will no longer be updated. Nullable. Expandable.customer_tax_exempt- The customer's tax exempt status. Until the invoice is finalized, this field will equalcustomer.tax_exempt. Once the invoice is finalized, this field will no longer be updated. Possible values:exempt,none,reverse. Nullable.customer_tax_ids- The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs ascustomer.tax_ids. Once the invoice is finalized, this field will no longer be updated. Nullable. Expandable.default_payment_method- 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. Nullable. Expandable.default_source- 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. Nullable. Expandable.default_tax_rates- The tax rates applied to this invoice, if any. Expandable.description- An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. Max length: 5000. Nullable.discounts- The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Useexpand[]=discountsto expand each discount. Expandable.due_date- The date on which payment for this invoice is due. This value will benullfor invoices wherecollection_method=charge_automatically. Format: Unix timestamp. Nullable.effective_at- The date when this invoice is in effect. Same asfinalized_atunless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. Format: Unix timestamp. Nullable.ending_balance- 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. Nullable.footer- Footer displayed on the invoice. Max length: 5000. Nullable.from_invoice- Details of the invoice that was cloned. See the revision documentation for more details. Nullable. Expandable.hosted_invoice_url- 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. Max length: 5000. Nullable.id- Unique identifier for the object. For preview invoices created using the create preview endpoint, this id will be prefixed withupcoming_in. Max length: 5000.invoice_pdf- The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. Max length: 5000. Nullable.issuer- Expandable.last_finalization_error- The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. Nullable. Expandable.latest_revision- The ID of the most recent non-draft revision of this invoice Nullable. Expandable.lines- The individual line items that make up the invoice.linesis sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. Expandable.livemode- Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.metadata- 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. Nullable.next_payment_attempt- The time at which payment will next be attempted. This value will benullfor invoices wherecollection_method=send_invoice. Format: Unix timestamp. Nullable.number- 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. Max length: 5000. Nullable.object- String representing the object's type. Objects of the same type share the same value. Possible values:invoice.on_behalf_of- 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 documentation for details. Nullable. Expandable.parent- The parent that generated this invoice Nullable. Expandable.payment_settings- Expandable.payments- Payments for this invoice Expandable.period_end- End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. Format: Unix timestamp.period_start- Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the line item period to get the service period for each price. Format: Unix timestamp.post_payment_credit_notes_amount- Total amount of all post-payment credit notes issued for this invoice.pre_payment_credit_notes_amount- Total amount of all pre-payment credit notes issued for this invoice.receipt_number- This is the transaction number that appears on email receipts sent for this invoice. Max length: 5000. Nullable.rendering- The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. Nullable. Expandable.shipping_cost- The details of the cost of shipping, including the ShippingRate applied on the invoice. Nullable. Expandable.shipping_details- Shipping details for the invoice. The Invoice PDF will use theshipping_detailsvalue if it is set, otherwise the PDF will render the shipping address from the customer. Nullable. Expandable.starting_balance- Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.statement_descriptor- Extra information about an invoice for the customer's credit card statement. Max length: 5000. Nullable.status- The status of the invoice, one ofdraft,open,paid,uncollectible, orvoid. Learn more Possible values:draft,open,paid,uncollectible,void. Nullable.status_transitions- Expandable.subscription- Nullable. Expandable.subtotal- Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporatedsubtotal_excluding_tax- The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated Nullable.test_clock- ID of the test clock this invoice belongs to. Nullable. Expandable.threshold_reason- Expandable.total- Total after discounts and taxes.total_discount_amounts- The aggregate amounts calculated per discount across all line items. Nullable. Expandable.total_excluding_tax- The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. Nullable.total_pretax_credit_amounts- Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. Nullable. Expandable.total_taxes- The aggregate tax information of all line items. Nullable. Expandable.webhooks_delivered_at- Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. 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. Format: Unix timestamp. Nullable.
@type threshold_reason() :: %{ optional(:amount_gte) => integer() | nil, optional(:item_reasons) => [threshold_reason_item_reasons()] | nil, optional(String.t()) => term() }
amount_gte- The total invoice amount threshold boundary if it triggered the threshold invoice. Nullable.item_reasons- Indicates which line items triggered a threshold invoice.
@type threshold_reason_item_reasons() :: %{ optional(:line_item_ids) => [String.t()] | nil, optional(:usage_gte) => integer() | nil, optional(String.t()) => term() }
line_item_ids- The IDs of the line items that triggered the threshold invoice.usage_gte- The quantity threshold boundary that applied to the given line item.
@type total_discount_amounts() :: %{ optional(:amount) => integer() | nil, optional(:discount) => String.t() | Stripe.Resources.Discount.t() | nil, optional(String.t()) => term() }
amount- The amount, in cents (or local equivalent), of the discount.discount- The discount that was applied to get this discount amount.
@type total_pretax_credit_amounts() :: %{ optional(:amount) => integer() | nil, optional(:credit_balance_transaction) => String.t() | Stripe.Resources.Billing.CreditBalanceTransaction.t() | nil, optional(:discount) => String.t() | Stripe.Resources.Discount.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
amount- The amount, in cents (or local equivalent), of the pretax credit amount.credit_balance_transaction- The credit balance transaction that was applied to get this pretax credit amount. Nullable.discount- The discount that was applied to get this pretax credit amount.type- Type of the pretax credit amount referenced. Possible values:credit_balance_transaction,discount.
@type total_taxes() :: %{ optional(:amount) => integer() | nil, optional(:tax_behavior) => String.t() | nil, optional(:tax_rate_details) => total_taxes_tax_rate_details() | nil, optional(:taxability_reason) => String.t() | nil, optional(:taxable_amount) => integer() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
amount- The amount of the tax, in cents (or local equivalent).tax_behavior- Whether this tax is inclusive or exclusive. Possible values:exclusive,inclusive.tax_rate_details- Additional details about the tax rate. Only present whentypeistax_rate_details. Nullable.taxability_reason- The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. Possible values:customer_exempt,not_available,not_collecting,not_subject_to_tax,not_supported,portion_product_exempt,portion_reduced_rated,portion_standard_rated,product_exempt,product_exempt_holiday,proportionally_rated,reduced_rated,reverse_charge,standard_rated,taxable_basis_reduced,zero_rated.taxable_amount- The amount on which tax is calculated, in cents (or local equivalent). Nullable.type- The type of tax information. Possible values:tax_rate_details.
@type total_taxes_tax_rate_details() :: %{ optional(:tax_rate) => String.t() | nil, optional(String.t()) => term() }
tax_rate- ID of the tax rate Max length: 5000.