Charge a deposit

Charges a stored payment method with no invoice (unallocated deposit) for the organization associated with the authenticated API key. The charge is attempted once against the supplied paymentMethodId. Accounting posts an unallocated payment; apply it to invoices later in QuickBooks / Xero / Business Central.

Organizations using the Xero accounting system must send depositType. depositType=prepayment creates a Xero prepayment: send revenueAccountId (the prepayment line account) from GET /v2/accounting-accounts?purpose=prepayment. The bank account still comes from the gateway, and the charge must be in the home currency. depositType=overpayment creates a Xero overpayment: send bankAccountId (the Xero bank account) from GET /v2/accounting-accounts?purpose=overpayment. Its currency must match the charge currency. depositType, revenueAccountId, and bankAccountId must be omitted when the accounting system is not Xero.

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 currency to use the organization home currency. Card charges are usually final on this response. Bank charges may return queued then pending — save data.id and poll GET /v2/transactions.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
^[0-9a-fA-F]{24}$

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

number
required
≤ 999999.99

Charge amount. Must be > 0, max 999999.99, up to 2 decimal places.

string
^[A-Za-z]{3}$

Charge currency (ISO 4217). Omit to use the organization home currency. For Xero prepayments, must be the home currency. For Xero overpayments, must match the bankAccountId currency.

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 accounting payment PDF to the receipt (Deposit.pdf for QuickBooks). Omit or false attaches no PDF. This does not use the organization attachInvoice setting.

string
enum

Xero only. Required when the accounting system is Xero. Do not use with other accounting systems. prepayment creates a Xero prepayment and needs revenueAccountId. overpayment creates a Xero overpayment and needs bankAccountId.

Allowed:
string
length between 1 and 100

Xero only. Required when depositType=prepayment. Account id for the prepayment line (revenue, prepayment, liability, or current asset). Get it from GET /v2/accounting-accounts?purpose=prepayment. This does not replace the gateway deposit account.

string
length between 1 and 100

Xero only. Required when depositType=overpayment. Xero bank account the overpayment posts to. Get it from GET /v2/accounting-accounts?purpose=overpayment. Its currency must match the charge currency.

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