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.
| Field | What it does |
|---|---|
| Credential (required) | The Stripe API credential of your account. |
| Type | Invoice 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. |
| Mode | Only in Get. By ID looks up one record; All returns the list. Defaults to By ID. |
| ID | The 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 ID | The customer’s identifier in Stripe (starts with cus_). Required in Create. In Get with All, shows only that customer’s records. |
| Amount | Only 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. |
| Currency | Only with Invoice Item in Create, and required there. The item’s currency, such as eur or usd. Defaults to usd. |
| Description | Descriptive text for the invoice or the item. In Create and Update. |
| Collection Method | Only 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 Due | Only with Invoice, in Create and Update. Days the customer has to pay. Only applies when Collection Method is send_invoice. Defaults to 30. |
| Footer | Only with Invoice, in Create and Update. Text shown at the bottom of the invoice. |
| Status Filter | Only with Invoice in Get with All. Returns only invoices in that status: draft, open (issued and pending), paid, void or uncollectible. |
| Invoice ID | Only 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. |
| Limit | Only 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
draftstatus. - Get: with
By IDreturns one invoice; withAllreturns the list, filtered by customer or status if you give them. - Pay: tries to collect an issued invoice now. Only works with invoices in
openstatus; 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
openstatus; 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 IDreturns one item; withAllreturns 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.
- Add Stripe Invoice with Type set to
Invoice Itemand Operation set toCreate. Fill in the customer’s Customer ID, the project Amount in cents, Currency set toeurand a Description. - Add another Stripe Invoice with Type set to
Invoiceand Operation set toCreatefor the same customer, with Collection Method set tosend_invoiceand Days Until Due set to30. The invoice picks up the pending item. - Add a third one with Operation set to
Finalizeand pass the new invoice’s identifier to ID. - Finish with one more with Operation set to
Sendso the customer receives it by email.
Related components
- Stripe Customer: create and manage customers.
- Stripe Subscription: recurring billing with subscriptions.
- Stripe Refund: refund a payment.