Charge an invoice (create transaction)

Charges a stored payment method against an accounting invoice for the organization associated with the authenticated API key (off-session AR collection). The charge is attempted once against the supplied paymentMethodId. HTTP 200 means the charge was attempted — read data and meta.effects (a decline is still 200). Setup failures return RFC 7807. Requires organizations:transactions:create and a required Idempotency-Key header.

Omit amount to charge the invoice open balance. Credit memos are not applied. If the invoice has installments, you still choose the amount; installment rows are not closed.

Card charges are usually final on this response. Bank charges may return queued then pending — save data.id and poll GET /v2/transactions. See the Charge an invoice guide.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length between 1 and 200

The accounting system invoice ID (e.g. the QuickBooks Id, Xero InvoiceID, or Business Central id). This is the value exposed as id on the invoice object.

string
required
^[0-9a-fA-F]{24}$

Stored payment method id to charge. Must belong to the invoice customer and a gateway that supports the invoice currency. Pending-verification methods and methods disabled after a past error return 400 and cannot be charged.

number
≤ 999999.99

Optional charge amount. Omit to charge the invoice open balance. Must be > 0, ≤ open balance, max 999999.99, up to 2 decimal places.

boolean

Whether to send a receipt email after a successful charge. Omit or true sends a receipt. false skips it.

boolean

Whether to attach the invoice PDF (Invoice-{number}.pdf) to the receipt. Omit to use the organization attachInvoice setting. This attaches the invoice PDF only, not the accounting payment PDF. Extra files already stored on the invoice still follow the organization sendInvoiceAttachments setting.

Headers
uuid

Optional client-supplied unique ID for one request. The server generates a UUID v4 if omitted and always echoes the value in the response.

uuid

Optional ID that flows across service boundaries for distributed tracing. The server generates a UUID v4 if omitted and always echoes the value in the response.

string
required
length between 1 and 255
^[a-zA-Z0-9]+$

Required client-supplied key that makes retries safe for this endpoint. Scoped per actor; cached for 24 hours. Replays return the cached response with X-Idempotency-Replayed: true. Same key with a different body returns 409. Missing key returns 400. In-flight duplicates return 429 with Retry-After. See the Idempotency section in the API overview.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json