Parameters for invoice create.
Summary
Types
@type automatic_tax() :: %{ optional(:enabled) => boolean() | nil, optional(:liability) => automatic_tax_liability() | nil, optional(String.t()) => term() }
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.
@type automatic_tax_liability() :: %{ optional(:account) => String.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
account- The connected account being referenced whentypeisaccount.type- Type of the account referenced in the request. Possible values:account,self.
@type from_invoice() :: %{ optional(:action) => String.t() | nil, optional(:invoice) => String.t() | nil, optional(String.t()) => term() }
action- The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted Possible values:revision. Max length: 5000.invoice- Theidof the invoice that will be cloned. Max length: 5000.
@type issuer() :: %{ optional(:account) => String.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
account- The connected account being referenced whentypeisaccount.type- Type of the account referenced in the request. Possible values:account,self.
@type payment_settings() :: %{ optional(:default_mandate) => map() | nil, optional(:payment_method_options) => payment_settings_payment_method_options() | nil, optional(:payment_method_types) => map() | 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.payment_method_options- Payment-method-specific configuration to provide to the invoice’s PaymentIntent.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.
@type payment_settings_payment_method_options() :: %{ optional(:acss_debit) => map() | nil, optional(:bancontact) => map() | nil, optional(:card) => map() | nil, optional(:customer_balance) => map() | nil, optional(:konbini) => map() | nil, optional(:payto) => map() | nil, optional(:sepa_debit) => map() | nil, optional(:us_bank_account) => map() | 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.bancontact- If paying bybancontact, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.card- If paying bycard, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent.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.konbini- If paying bykonbini, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent.payto- If paying bypayto, this sub-hash contains details about the PayTo payment method options to pass to the invoice’s PaymentIntent.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.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.
@type rendering() :: %{ optional(:amount_tax_display) => String.t() | nil, optional(:pdf) => rendering_pdf() | nil, optional(:template) => String.t() | nil, optional(:template_version) => map() | nil, optional(String.t()) => term() }
amount_tax_display- How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One ofexclude_taxorinclude_inclusive_tax.include_inclusive_taxwill include inclusive tax (and exclude exclusive tax) in invoice PDF amounts.exclude_taxwill exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. Possible values:exclude_tax,include_inclusive_tax.pdf- Invoice pdf rendering optionstemplate- ID of the invoice rendering template to use for this invoice. Max length: 5000.template_version- The specific version of invoice rendering template to use for this invoice.
@type rendering_pdf() :: %{ optional(:page_size) => String.t() | nil, optional(String.t()) => term() }
page_size- Page size for invoice PDF. Can be set toa4,letter, orauto. If set toauto, invoice PDF page size defaults toa4for customers with Japanese locale andletterfor customers with other locales. Possible values:a4,auto,letter.
@type shipping_cost() :: %{ optional(:shipping_rate) => String.t() | nil, optional(:shipping_rate_data) => shipping_cost_shipping_rate_data() | nil, optional(String.t()) => term() }
shipping_rate- The ID of the shipping rate to use for this order. Max length: 5000.shipping_rate_data- Parameters to create a new ad-hoc shipping rate for this order.
@type shipping_cost_shipping_rate_data() :: %{ optional(:delivery_estimate) => shipping_cost_shipping_rate_data_delivery_estimate() | nil, optional(:display_name) => String.t() | nil, optional(:fixed_amount) => shipping_cost_shipping_rate_data_fixed_amount() | nil, optional(:metadata) => %{required(String.t()) => String.t()} | nil, optional(:tax_behavior) => String.t() | nil, optional(:tax_code) => String.t() | nil, optional(:type) => String.t() | nil, optional(String.t()) => term() }
delivery_estimate- The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.display_name- The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. Max length: 100.fixed_amount- Describes a fixed amount to charge for shipping. Must be present if type isfixed_amount.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata.tax_behavior- Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One ofinclusive,exclusive, orunspecified. Possible values:exclusive,inclusive,unspecified.tax_code- A tax code ID. The Shipping tax code istxcd_92010001.type- The type of calculation to use on the shipping rate. Possible values:fixed_amount.
@type shipping_cost_shipping_rate_data_delivery_estimate() :: %{ optional(:maximum) => shipping_cost_shipping_rate_data_delivery_estimate_maximum() | nil, optional(:minimum) => shipping_cost_shipping_rate_data_delivery_estimate_minimum() | nil, optional(String.t()) => term() }
maximum- The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.minimum- The lower bound of the estimated range. If empty, represents no lower bound.
@type shipping_cost_shipping_rate_data_delivery_estimate_maximum() :: %{ optional(:unit) => String.t() | nil, optional(:value) => integer() | nil, optional(String.t()) => term() }
unit- A unit of time. Possible values:business_day,day,hour,month,week.value- Must be greater than 0.
@type shipping_cost_shipping_rate_data_delivery_estimate_minimum() :: %{ optional(:unit) => String.t() | nil, optional(:value) => integer() | nil, optional(String.t()) => term() }
unit- A unit of time. Possible values:business_day,day,hour,month,week.value- Must be greater than 0.
@type shipping_cost_shipping_rate_data_fixed_amount() :: %{ optional(:amount) => integer() | nil, optional(:currency) => String.t() | nil, optional(:currency_options) => %{ required(String.t()) => shipping_cost_shipping_rate_data_fixed_amount_currency_options() } | nil, optional(String.t()) => term() }
amount- A non-negative integer in cents representing how much to charge.currency- Three-letter ISO currency code, in lowercase. Must be a supported currency. Format: ISO 4217 currency code.currency_options- Shipping rates defined in each available currency option. Each key must be a three-letter ISO currency code and a supported currency.
@type shipping_cost_shipping_rate_data_fixed_amount_currency_options() :: %{ optional(:amount) => integer() | nil, optional(:tax_behavior) => String.t() | nil, optional(String.t()) => term() }
amount- A non-negative integer in cents representing how much to charge.tax_behavior- Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One ofinclusive,exclusive, orunspecified. Possible values:exclusive,inclusive,unspecified.
@type shipping_details() :: %{ optional(:address) => shipping_details_address() | nil, optional(:name) => String.t() | nil, optional(:phone) => map() | nil, optional(String.t()) => term() }
address- Shipping addressname- Recipient name. Max length: 5000.phone- Recipient phone (including extension)
@type shipping_details_address() :: %{ optional(:city) => String.t() | nil, optional(:country) => String.t() | nil, optional(:line1) => String.t() | nil, optional(:line2) => String.t() | nil, optional(:postal_code) => String.t() | nil, optional(:state) => String.t() | nil, optional(String.t()) => term() }
city- City, district, suburb, town, or village. Max length: 5000.country- Two-letter country code (ISO 3166-1 alpha-2). Max length: 5000.line1- Address line 1, such as the street, PO Box, or company name. Max length: 5000.line2- Address line 2, such as the apartment, suite, unit, or building. Max length: 5000.postal_code- ZIP or postal code. Max length: 5000.state- State, county, province, or region (ISO 3166-2). Max length: 5000.
@type t() :: %Stripe.Params.InvoiceCreateParams{ account_tax_ids: map() | nil, application_fee_amount: integer() | nil, auto_advance: boolean() | nil, automatic_tax: automatic_tax() | nil, automatically_finalizes_at: integer() | nil, collection_method: String.t() | nil, currency: String.t() | nil, custom_fields: map() | nil, customer: String.t() | nil, customer_account: String.t() | nil, days_until_due: integer() | nil, default_payment_method: String.t() | nil, default_source: String.t() | nil, default_tax_rates: [String.t()] | nil, description: String.t() | nil, discounts: map() | nil, due_date: integer() | nil, effective_at: integer() | nil, expand: [String.t()] | nil, footer: String.t() | nil, from_invoice: from_invoice() | nil, issuer: issuer() | nil, metadata: map() | nil, number: String.t() | nil, on_behalf_of: String.t() | nil, payment_settings: payment_settings() | nil, pending_invoice_items_behavior: String.t() | nil, rendering: rendering() | nil, shipping_cost: shipping_cost() | nil, shipping_details: shipping_details() | nil, statement_descriptor: String.t() | nil, subscription: String.t() | nil, transfer_data: transfer_data() | nil }
account_tax_ids- The account tax IDs associated with the invoice. Only editable when the invoice is a draft.application_fee_amount- A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation.auto_advance- Controls whether Stripe performs automatic collection of the invoice. Iffalse, the invoice's state doesn't automatically advance without an explicit action. Defaults to false.automatic_tax- Settings for automatic tax lookup for this invoice.automatically_finalizes_at- The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. Format: Unix timestamp.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. Defaults tocharge_automatically. Possible values:charge_automatically,send_invoice.currency- The currency to create this invoice in. Defaults to that ofcustomerif not specified. Format: ISO 4217 currency code.custom_fields- A list of up to 4 custom fields to be displayed on the invoice.customer- The ID of the customer to bill. Max length: 5000.customer_account- The ID of the account to bill. Max length: 5000.days_until_due- The number of days from when the invoice is created until it is due. Valid only for invoices wherecollection_method=send_invoice.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. Max length: 5000.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. Max length: 5000.default_tax_rates- The tax rates that will apply to any line item that does not havetax_ratesset.description- An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. Max length: 1500.discounts- The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts.due_date- The date on which payment for this invoice is due. Valid only for invoices wherecollection_method=send_invoice. Format: Unix timestamp.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.expand- Specifies which fields in the response should be expanded.footer- Footer to be displayed on the invoice. Max length: 5000.from_invoice- Revise an existing invoice. The new invoice will be created instatus=draft. See the revision documentation for more details.issuer- The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata.number- Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. Max length: 26.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.payment_settings- Configuration settings for the PaymentIntent that is generated when the invoice is finalized.pending_invoice_items_behavior- How to handle pending invoice items on invoice creation. Defaults toexcludeif the parameter is omitted. Possible values:exclude,include.rendering- The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.shipping_cost- Settings for the cost of shipping for this invoice.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.statement_descriptor- Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the defaultstatement_descriptorwill be set to the first subscription item's product'sstatement_descriptor. Max length: 22.subscription- The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. Max length: 5000.transfer_data- If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge.
@type transfer_data() :: %{ optional(:amount) => integer() | nil, optional(:destination) => String.t() | nil, optional(String.t()) => term() }
amount- The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.destination- ID of an existing, connected Stripe account.