Skip to main content

Send Invoice

POST 

/api/stripe/invoices

Creates, finalizes, and sends a Stripe Invoice for a sales order — or, with sales_invoice_id, for one issued sales invoice's balance due. Stripe emails the customer the hosted invoice link automatically. If a payable open invoice already exists for the sales order it is returned instead of creating a new one (idempotent).

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Fields:

  • integration_instance_id (required, integer) — the Stripe integration to charge through
  • sales_order_id (integer, required unless sales_invoice_id is sent) — the sales order being invoiced
  • sales_invoice_id (optional, integer) — send one sales invoice instead of the whole order: the default amount is the invoice's balance due, and the payment is allocated to that invoice when Stripe reports it paid. sales_order_id is then not needed. Returns 404 when the invoice does not exist and 422 when it is not issued, is not linked to a sales order, or has no outstanding balance
  • amount_in_cents (optional, integer, min 1) — override the order outstanding balance, in the currency's smallest unit; if omitted the full outstanding balance is invoiced
  • customer_email (optional, email) — override the customer email on file (defaults to the sales order's customer email)

Rate limited: 30 requests/minute.

Returns 422 when the invoice is refused: the sales order has no outstanding balance, has no currency (and the Stripe account has no default currency), or has no valid customer email.

amount_in_cents is in the currency's smallest unit, as Stripe expects it: cents for USD/EUR (2-decimal currencies), whole units for zero-decimal currencies (¥1,000 → 1000 for JPY, also KRW, VND, CLP…), thousandths for three-decimal currencies (KWD, BHD, JOD, OMR, TND: 1.500 KWD → 1500). The default (outstanding balance / remaining refundable amount) is computed the same way.

Request​

Responses​

Created

Response Headers
    Content-Type