Skip to main content
POST
Create checkout configuration
This page documents the Legacy API. For new integrations, use Create a checkout configuration in the Current API.
Required permissions:
  • checkout_configuration:create
  • plan:create
  • access_pass:create
  • access_pass:update
  • checkout_configuration:basic:read

Autorizaciones

Authorization
string
header
requerido

An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.

Scopes

checkout_configuration:create
plan:create
access_pass:create
access_pass:update
checkout_configuration:basic:read

Cuerpo

application/json

Autogenerated input type of CreateCheckoutSession

plan
object
requerido

The plan attributes to create a new plan inline for this checkout configuration.

affiliate_code
string | null

An affiliate tracking code to attribute the checkout to a specific affiliate.

checkout_styling
object | null

Checkout styling overrides for this session. Overrides plan and company defaults.

currency
enum<string> | null

The currency for the checkout when in setup mode. Controls which currency-specific payment methods are available. Defaults to USD when in setup mode.

Opciones disponibles:
usd,
sgd,
inr,
aud,
brl,
cad,
dkk,
eur,
nok,
gbp,
sek,
chf,
hkd,
huf,
jpy,
mxn,
myr,
pln,
czk,
nzd,
aed,
eth,
ape,
cop,
ron,
thb,
bgn,
idr,
dop,
php,
try,
krw,
twd,
vnd,
pkr,
clp,
uyu,
ars,
zar,
dzd,
tnd,
mad,
kes,
kwd,
jod,
all,
xcd,
amd,
bsd,
bhd,
bob,
bam,
khr,
crc,
xof,
egp,
etb,
gmd,
ghs,
gtq,
gyd,
ils,
jmd,
mop,
mga,
mur,
mdl,
mnt,
nad,
ngn,
mkd,
omr,
pyg,
pen,
qar,
rwf,
sar,
rsd,
lkr,
tzs,
ttd,
uzs,
rub,
btc,
cny,
usdt,
kzt,
awg,
whop_usd,
xau,
hnl
metadata
object | null

Custom key-value metadata to attach to the checkout configuration.

mode
string
Allowed value: "payment"
payment_method_configuration
object | null

The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.

redirect_url
string | null

The URL to redirect the user to after checkout is completed.

Respuesta

A successful response

A checkout configuration is a reusable configuration for a checkout, including the plan, affiliate, and custom metadata. Payments and memberships created from a checkout session inherit its metadata.

account_id
string
requerido

The ID of the account to use for the checkout configuration

affiliate_code
string | null
requerido

The affiliate code to use for the checkout configuration

company_id
string
requerido

The ID of the account to use for the checkout configuration

currency
enum<string> | null
requerido

The currency to use for the configuration when in 'setup' mode. This is used to target which currency specific payment methods are available. If not provided, it will default to 'usd' when in setup mode.

Opciones disponibles:
usd,
sgd,
inr,
aud,
brl,
cad,
dkk,
eur,
nok,
gbp,
sek,
chf,
hkd,
huf,
jpy,
mxn,
myr,
pln,
czk,
nzd,
aed,
eth,
ape,
cop,
ron,
thb,
bgn,
idr,
dop,
php,
try,
krw,
twd,
vnd,
pkr,
clp,
uyu,
ars,
zar,
dzd,
tnd,
mad,
kes,
kwd,
jod,
all,
xcd,
amd,
bsd,
bhd,
bob,
bam,
khr,
crc,
xof,
egp,
etb,
gmd,
ghs,
gtq,
gyd,
ils,
jmd,
mop,
mga,
mur,
mdl,
mnt,
nad,
ngn,
mkd,
omr,
pyg,
pen,
qar,
rwf,
sar,
rsd,
lkr,
tzs,
ttd,
uzs,
rub,
btc,
cny,
usdt,
kzt,
awg,
whop_usd,
xau,
hnl
id
string
requerido

The unique identifier for the checkout session.

Ejemplo:

"ch_xxxxxxxxxxxxxxx"

metadata
object | null
requerido

The metadata to use for the checkout configuration

mode
enum<string>
requerido

The mode of the checkout session.

Opciones disponibles:
payment,
setup
payment_method_configuration
object | null
requerido

The explicit payment method configuration for the session, if any. This currently only works in 'setup' mode. Use the plan's payment_method_configuration for payment method.

plan
object | null
requerido

The plan to use for the checkout configuration

purchase_url
string
requerido

A URL you can send to customers to complete a checkout. It looks like /checkout/ch_xxxx/

redirect_url
string | null
requerido

The URL to redirect the user to after the checkout configuration is created