Skip to content

Stripe Invoice

Stripe Invoice manages the invoices in your Stripe account and the items they are made of. With it you can prepare an invoice for a customer, add items to it, finalize it, send it by email, collect it or void it, and also look up existing invoices.

The Type field decides what you work with: Invoice for the invoice itself or Invoice Item for the items (lines with an amount) billed to a customer. When you change it, the available operations change.

When to use it

  • When a service is finished, you want to add the item to the customer and issue the invoice without opening Stripe.
  • You want to email an invoice with 30 days to pay.
  • Every month you want to review your customers’ open or unpaid invoices.
  • An invoice was issued by mistake and you want to void it.

Configuration

You need a Stripe API credential with the secret key of your Stripe account. See Credentials.

FieldWhat it does
Credential (required)The Stripe API credential of your account.
TypeInvoice to work with invoices or Invoice Item to work with invoice items. Defaults to Invoice.
Operation (required)The action the component performs. The options depend on Type. See Operations.
ModeOnly in Get. By ID looks up one record; All returns the list. Defaults to By ID.
IDThe identifier of the invoice (starts with in_) or of the item (starts with ii_). Required in Get with By ID and in every operation except Create.
Customer IDThe customer’s identifier in Stripe (starts with cus_). Required in Create. In Get with All, shows only that customer’s records.
AmountOnly with Invoice Item, in Create (required) and Update. The item’s amount in the smallest unit of the currency, for example cents: 1000 is 10.00.
CurrencyOnly with Invoice Item in Create, and required there. The item’s currency, such as eur or usd. Defaults to usd.
DescriptionDescriptive text for the invoice or the item. In Create and Update.
Collection MethodOnly with Invoice, in Create and Update. charge_automatically charges the invoice to the customer’s payment method; send_invoice emails it to them so they pay it. Left empty, Stripe’s own setting is used.
Days Until DueOnly with Invoice, in Create and Update. Days the customer has to pay. Only applies when Collection Method is send_invoice. Defaults to 30.
FooterOnly with Invoice, in Create and Update. Text shown at the bottom of the invoice.
Status FilterOnly with Invoice in Get with All. Returns only invoices in that status: draft, open (issued and pending), paid, void or uncollectible.
Invoice IDOnly with Invoice Item, in Create and in Get with All. The invoice the item belongs to. In Create, if you leave it empty, the item stays pending and goes into the customer’s next invoice.
LimitOnly in Get with All. Maximum number of records returned, between 1 and 100. Defaults to 100.

Operations

With Type set to Invoice:

  • Create: creates a draft invoice for the customer. It includes the items the customer has pending.
  • Delete: deletes a draft invoice.
  • Finalize: issues a draft invoice so it can be paid. Only works with invoices in draft status.
  • Get: with By ID returns one invoice; with All returns the list, filtered by customer or status if you give them.
  • Pay: tries to collect an issued invoice now. Only works with invoices in open status; if it is still a draft, finalize it first.
  • Send: emails the invoice to the customer. Only works if its Collection Method is send_invoice.
  • Update: changes the description, collection method, payment terms or footer of an invoice.
  • Void: voids an issued invoice. Only works with invoices in open status; a paid invoice cannot be voided, so issue a refund with Stripe Refund instead.

With Type set to Invoice Item:

  • Create: adds an item with an amount to the customer, on a specific invoice or pending for the next one.
  • Delete: deletes an item.
  • Get: with By ID returns one item; with All returns the list, filtered by customer or invoice if you give them.
  • Update: changes the amount or description of an item.

If an operation cannot be done because of the invoice’s status, the component stops with a message that explains why.

Output

The Data output returns the invoice or item you worked with. With Get and All, it returns one item per record. Each invoice includes, among other Stripe details, its identifier, status, total and due amount, and the link where the customer can view and pay it.

You can connect it to an email, to your accounting system or to a condition that checks the status. The component can also be connected to an Agent as a tool, so the agent decides when to use it. See Tool Mode.

Example

A consultancy invoices each project when it closes.

  1. Add Stripe Invoice with Type set to Invoice Item and Operation set to Create. Fill in the customer’s Customer ID, the project Amount in cents, Currency set to eur and a Description.
  2. Add another Stripe Invoice with Type set to Invoice and Operation set to Create for the same customer, with Collection Method set to send_invoice and Days Until Due set to 30. The invoice picks up the pending item.
  3. Add a third one with Operation set to Finalize and pass the new invoice’s identifier to ID.
  4. Finish with one more with Operation set to Send so the customer receives it by email.