Build and run it yourself · Extend
Extend
Stripe invoicing
Prepare an invoice from a customer record, review it, and follow its provider result.
Updated September 13, 2026 3 min read
An invoice is where a business decision turns into a real financial document, and getting the amount, the recipient, or the terms wrong there is costlier than almost any other mistake in the product. This example shows how an extension can use your existing customer records, a connected provider, and the shared approval flow together, while keeping a separate, honest record of what Stripe actually accepted versus what you merely asked it to do.
Try a complete invoice
Enable Stripe invoicing in Plugins, configure the workspace's Stripe connection in Integrations, and open /admin/invoicing. Credentials belong in the server-only connection controls. Verify test or live mode before a provider action.
- Select an existing contact and its matching Stripe billing customer.
- Enter currency, line items and payment terms. For a fictional example, use one consulting session at
125.00USD, quantity one. The UI uses normal currency units; the corresponding API value is12500minor units. - Preview the recipient, amount and terms, then submit the exact draft for approval.
- After approval execution, inspect the provider result. Use the separate reviewed send control when ready, and check its receipt.
A created draft, a sent invoice and a paid invoice are different states. The demo simulates provider actions with fictional records and does not create a live invoice.
Give the customer a coherent experience
The invoice presentation controls support a branded customer page. Review an AI-assisted design before the separate publication approval. Public content should contain only information intended for the recipient. Demo previews remain inside the browser scenario; they are not live public links.
What this example teaches you to build
An external action needs more than a form. The plugin connects a source record, a reviewable plan, provider execution and a durable result. You can study this pattern when adding another billing or document service.
AI tools prepare_stripe_invoice and propose_stripe_invoice use the same services as the interface. Provider secrets stay on the host, and the model cannot approve its own action. See the workflow source and developer guide for contracts, verification and upgrade behavior.
Costs and recovery
Draft preparation is deterministic. Stripe usage, hosting and any AI design or chat can incur their normal costs. There is no plugin-specific unlimited free allowance.
If the contact has no matching Stripe customer, correct or add the billing customer and refresh the choices. After a timeout, inspect the original action and provider invoice before retrying with its existing identity. A changed draft needs a new preview and approval.
Disabling the plugin blocks any later plugin execution, while existing invoices, payments, and published pages all stay exactly as they were; revoke a public page through its own explicit control if you need to. Disabling never reverses a provider effect that already happened, and the controlled tests in the developer guide are a check on the code, not proof that your specific live connection or payment actually works.