Skip to main content
POST

Authorizations

Authorization
string
header
required

Merchant API key bearer token. Legacy wire prefixes api_key_ and api_ are also accepted.

Path Parameters

id
string
required

Invoice TypeID (inv_...) to charge.

Example:

"inv_01hxy8m1nqk9g3x3y3p0azq2va"

Body

application/json

Charge payload with idempotency key, merchant scope, payment instrument, and optional partial amount.

idempotencyKey
string
required

Idempotency key for safe retries of the charge per invoice.

Minimum string length: 1
merchantId
string
required

Merchant TypeID (mer_...) used for authorization scope.

paymentInstrumentId
string
required

Payment instrument TypeID (pi_...) to charge. Must belong to the invoice's customer and be active.

amount
integer

Minor-unit amount to charge. Defaults to the full remaining balance. Must not exceed it.

Required range: 0 < x <= 9007199254740991

Response

Charge accepted. Returns the invoice plus the newly created pending allocation.

invoice
object
required
allocation
object
required