Skip to main content
POST
Create a payment

Authorizations

X-Suby-Api-Key
string
header
required

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

Body

application/json

Provide productId OR amount+currency, and exactly one of customerId/customerData.

method
enum<string>
required
Available options:
CARD,
APPLE_PAY,
GOOGLE_PAY,
KLARNA,
IDEAL,
BANCONTACT,
TWINT,
BLIK,
AFFIRM,
MULTIBANCO,
PAYPAL,
SEPA_DIRECT_DEBIT,
ACH_DIRECT_DEBIT,
CRYPTO
productId
string
Example:

"pro_abc123"

amount
integer

Amount in cents (with currency).

Required range: x >= 1
currency
string
Pattern: ^[A-Z]{3}$
displayName
string
Maximum string length: 200
displayDescription
string | null
Maximum string length: 500
displayImageUrl
string<uri> | null
taxBehavior
enum<string>

MoR VAT: exclusive (default) adds VAT on top of the price (buyer charged price + VAT); inclusive treats the price as VAT-inclusive (buyer charged the listed price, VAT extracted). Ignored when no VAT applies.

Available options:
inclusive,
exclusive
customerId
string
Example:

"cus_abc123"

customerData
object

Inline customer for create-on-the-fly. Mutually exclusive with customerId.

billingAddress
object
businessData
object

B2B purchase (Merchant-of-Record modes only). Drives the VAT reverse-charge (0% VAT except France) and is stored on the customer. businessName doubles as the card holder name.

customerPaymentMethodId
string

Charge a saved payment method.

Example:

"pi_abc123"

card
object

Card / APM instrument options. Ignored on crypto rails. Identify what to charge either with a fresh tokenizedInstrument, or — for proactive 3DS — with the paymentInstrumentId + providerCustomerId + threedsSessionId trio returned by the 3DS session.

crypto
object

Crypto routing options. Required when method=CRYPTO (mode, chainId and assetId are all mandatory then); ignored otherwise.

captureMethod
enum<string>
default:automatic
Available options:
automatic,
manual
offSession
boolean
default:false

Requires customerId + customerPaymentMethodId.

savePaymentMethod
boolean
default:false

Requires a customer.

successUrl
string<uri>
cancelUrl
string<uri>
externalRef
string
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