Skip to main content
POST
Debit a stored card, off-session

Authorizations

X-Suby-Api-Key
string
header
required

Secret API key. sk_live_… (production) or sk_sandbox_… (sandbox).

Headers

Idempotency-Key
string

Optional key (≤255 chars, e.g. a UUID v4) making this POST safe to retry · the response is cached 24h and a retry with the SAME key replays it instead of re-executing. The same key with a different body → 422 IDEMPOTENCY_KEY_CONFLICT; a retry while the first is in flight → 409.

Maximum string length: 255
Example:

"5f3b9c2e-1a4d-4f2b-9c31-7e2a1b6d8c04"

Body

application/json

One shape only · an off-session debit of a stored card against a pay_as_you_go product. There is no method: customerPaymentMethodId names the instrument, and the instrument decides. A payer-present charge goes through the hosted checkout, crypto through POST /v3/crypto/charges.

offSession
enum<boolean>
required

Always true.

Available options:
true
customer
object
required

The customer must already exist · there is nothing stored to debit otherwise.

customerPaymentMethodId
string
required

The stored card to debit, from GET /v3/customers/{id}/payment-methods.

Example:

"pi_abc123"

productId
string
required

A pay_as_you_go product · what the usage belongs to, and what product_id carries on payment.succeeded.

Example:

"pro_abc123"

priceCents
string
required

Minor units as a string of digits · "1250" = 12.50. The currency is the product's. Under 1.00 (VAT included) is refused with CARD_PAYMENT_BELOW_MIN.

Pattern: ^[1-9]\d*$
Example:

"1250"

displayName
string

Receipt label for this period. Defaults to the product name.

Maximum string length: 200
Example:

"April usage"

displayDescription
string | null
Maximum string length: 500
displayImageUrl
string<uri> | null
taxBehavior
enum<string>

MoR VAT · defaults to the product's. Inert when no VAT applies.

Available options:
inclusive,
exclusive
billingAddress
object

Required when the customer has none on file · acquirers reject an empty country.

businessData
object

Optional · omit it and the customer's stored isBusiness decides. Send it only to state something different for this debit.

externalRef
string

Your reference · stored, echoed, filterable.

Maximum string length: 120
metadata
object

Key-value pairs. ≤50 keys, keys ≤40 chars, values are strings ≤500 chars (or null to clear). Nested structures must be JSON-stringified into a single string value.

Response

Payment created

success
boolean
required
Example:

true

data
object
required

Endpoint-specific payload.

message
string