POST /v1/invoices

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
auto_advance Boolean No

Controls whether Stripe performs automatic collection of the invoice. If false, the invoice's state doesn't automatically advance without an explicit action.

discounts No

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.

days_until_due Integer No

The number of days from when the invoice is created until it is due. Valid only for invoices where collection_method=send_invoice.

description String No

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

subscription String No

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.

application_fee_amount Integer No

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.

metadata No

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 to metadata.

collection_method String No

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. Defaults to charge_automatically.

Possible values:

  • "send_invoice"
  • "charge_automatically"
currency String No

The currency to create this invoice in. Defaults to that of customer if not specified.

from_invoice Object No

Revise an existing invoice. The new invoice will be created in status=draft. See the revision documentation for more details.

from_invoice.action String Yes

Possible values:

  • "revision"
from_invoice.invoice String Yes
footer String No

Footer to be displayed on the invoice.

on_behalf_of String No

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.

default_tax_rates[] Array No

The tax rates that will apply to any line item that does not have tax_rates set.

issuer Object No

The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.

issuer.account String No
issuer.type String Yes

Possible values:

  • "account"
  • "self"
statement_descriptor String No

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 default statement_descriptor will be set to the first subscription item's product's statement_descriptor.

custom_fields No

A list of up to 4 custom fields to be displayed on the invoice.

transfer_data Object No

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.

transfer_data.destination String Yes
transfer_data.amount Integer No
shipping_details Object No

Shipping details for the invoice. The Invoice PDF will use the shipping_details value if it is set, otherwise the PDF will render the shipping address from the customer.

shipping_details.name String Yes
shipping_details.phone No
shipping_details.address Object Yes
shipping_details.address.line2 String No
shipping_details.address.line1 String No
shipping_details.address.postal_code String No
shipping_details.address.country String No
shipping_details.address.state String No
shipping_details.address.city String No
pending_invoice_items_behavior String No

How to handle pending invoice items on invoice creation. Defaults to exclude if the parameter is omitted.

Possible values:

  • "exclude"
  • "include"
account_tax_ids No

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

number String No

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.

expand[] Array No

Specifies which fields in the response should be expanded.

rendering Object No

The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.

rendering.template String No
rendering.pdf Object No
rendering.pdf.page_size String No

Possible values:

  • "letter"
  • "auto"
  • "a4"
rendering.template_version No
rendering.amount_tax_display String No

Possible values:

  • ""
  • "include_inclusive_tax"
  • "exclude_tax"
automatic_tax Object No

Settings for automatic tax lookup for this invoice.

automatic_tax.enabled Boolean Yes
automatic_tax.liability Object No
automatic_tax.liability.account String No
automatic_tax.liability.type String Yes

Possible values:

  • "account"
  • "self"
shipping_cost Object No

Settings for the cost of shipping for this invoice.

shipping_cost.shipping_rate_data Object No
shipping_cost.shipping_rate_data.tax_code String No
shipping_cost.shipping_rate_data.delivery_estimate Object No
shipping_cost.shipping_rate_data.delivery_estimate.minimum Object No
shipping_cost.shipping_rate_data.delivery_estimate.minimum.value Integer Yes
shipping_cost.shipping_rate_data.delivery_estimate.minimum.unit String Yes

Possible values:

  • "month"
  • "day"
  • "business_day"
  • "week"
  • "hour"
shipping_cost.shipping_rate_data.delivery_estimate.maximum Object No
shipping_cost.shipping_rate_data.delivery_estimate.maximum.value Integer Yes
shipping_cost.shipping_rate_data.delivery_estimate.maximum.unit String Yes

Possible values:

  • "month"
  • "day"
  • "business_day"
  • "week"
  • "hour"
shipping_cost.shipping_rate_data.display_name String Yes
shipping_cost.shipping_rate_data.fixed_amount Object No
shipping_cost.shipping_rate_data.fixed_amount.amount Integer Yes
shipping_cost.shipping_rate_data.fixed_amount.currency_options Object No
shipping_cost.shipping_rate_data.fixed_amount.currency_options.name Object No
shipping_cost.shipping_rate_data.fixed_amount.currency_options.name.amount Integer Yes
shipping_cost.shipping_rate_data.fixed_amount.currency_options.name.tax_behavior String No

Possible values:

  • "inclusive"
  • "unspecified"
  • "exclusive"
shipping_cost.shipping_rate_data.fixed_amount.currency String Yes
shipping_cost.shipping_rate_data.metadata Object No
shipping_cost.shipping_rate_data.type String No

Possible values:

  • "fixed_amount"
shipping_cost.shipping_rate_data.tax_behavior String No

Possible values:

  • "inclusive"
  • "unspecified"
  • "exclusive"
shipping_cost.shipping_rate String No
automatically_finalizes_at Integer No

The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.

payment_settings Object No

Configuration settings for the PaymentIntent that is generated when the invoice is finalized.

payment_settings.default_mandate No
payment_settings.payment_method_types No
payment_settings.payment_method_options Object No
payment_settings.payment_method_options.konbini No
payment_settings.payment_method_options.customer_balance No
payment_settings.payment_method_options.bancontact No
payment_settings.payment_method_options.card No
payment_settings.payment_method_options.us_bank_account No
payment_settings.payment_method_options.acss_debit No
payment_settings.payment_method_options.sepa_debit No
customer String No

The ID of the customer who will be billed.

default_payment_method String No

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 String No

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.

effective_at Integer No

The date when this invoice is in effect. Same as finalized_at unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.

due_date Integer No

The date on which payment for this invoice is due. Valid only for invoices where collection_method=send_invoice.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.