Create Invoice

stripe.create_invoice
ActionBusiness appsconnection required

Calls the Stripe API with the connection's secret key.

Create a draft invoice for a Stripe customer.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Stripe
Secret shape
the Stripe secret key (sk_...)
Resolved by
config.connection_id, else node.connection_id

Configuration

9 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
customer
The customer to bill (cus_...).
stringYes——cus_NffrFeUfNV2Hib
collection_method
charge_automatically bills the customer's saved payment method; send_invoice emails an invoice with payment instructions.
stringNo—one of "charge_automatically", "send_invoice"—
days_until_due
Days the customer has to pay. Only used with send_invoice.
numberConditional—≥ 0; only with collection_method—
description
Memo shown to the customer on the invoice.
stringNo———
subscription
Invoice only the pending items of this subscription (sub_...).
stringNo———
pending_invoice_items_behavior
include pulls the customer's pending invoice items onto this invoice; exclude (the default) starts an empty draft.
stringNo—one of "include", "exclude"—
auto_advance
Let Stripe finalise and collect this invoice on its own schedule.
booleanNo———
metadata
Key/value pairs stored on the invoice and returned on every read.
objectNo———
idempotency_key
Overrides the key this node derives from the step. Set it to a business identifier (an order id, say) when the same write must not repeat across runs; leave it blank and a retry of this step reuses the step's own key.
stringNo—≤ 255 characters—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "customer": "cus_NffrFeUfNV2Hib"
}

Output

One shape.

result

FieldTypeExample
id
The invoice id (in_...).
string—
number
The customer-facing invoice number, once finalised.
string—
status
One of draft, open, paid, uncollectible or void.
string—
customer
The customer being billed.
string—
currency
Three-letter lowercase ISO currency code.
string—
subtotal
Total before discounts and tax, in the minor unit.
number—
total
Total after discounts and tax, in the minor unit.
number—
amount_due
Amount due on this invoice, in the minor unit.
number—
amount_paid
Amount paid so far, in the minor unit.
number—
amount_remaining
Amount still owed, in the minor unit.
number—
collection_method
charge_automatically or send_invoice.
string—
due_date
When payment is due, Unix seconds, or null.
number—
hosted_invoice_url
Stripe-hosted page where the customer can pay.
string—
invoice_pdf
Link to the invoice PDF, once finalised.
string—
created
Creation time, as a Unix timestamp in seconds.
number—
metadata
The key/value pairs stored on the invoice.
object—
{
  "amount_due": 0,
  "amount_paid": 0,
  "amount_remaining": 0,
  "collection_method": "",
  "created": 0,
  "currency": "",
  "customer": "",
  "due_date": 0,
  "hosted_invoice_url": "",
  "id": "",
  "invoice_pdf": "",
  "metadata": {},
  "number": "",
  "status": "",
  "subtotal": 0,
  "total": 0
}

Notes

  • The invoice is created as a draft. Nothing is charged and no number is assigned until it is finalised.

See Create Invoice run in a workflow.

In a technical demo we add the Stripe connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.