Skip to main content
GET
/
checkout_configurations
/
{id}
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

const checkoutConfiguration = await client.checkoutConfigurations.retrieve('ch_xxxxxxxxxxxxxxx');

console.log(checkoutConfiguration.id);
{
  "id": "ch_xxxxxxxxxxxxxxx",
  "company_id": "<string>",
  "mode": "payment",
  "currency": "usd",
  "plan": {
    "id": "plan_xxxxxxxxxxxxx",
    "visibility": "visible",
    "plan_type": "renewal",
    "release_method": "buy_now",
    "currency": "usd",
    "billing_period": 42,
    "expiration_days": 42,
    "initial_price": 6.9,
    "renewal_price": 6.9,
    "trial_period_days": 42
  },
  "affiliate_code": "<string>",
  "metadata": {},
  "redirect_url": "<string>",
  "purchase_url": "<string>",
  "payment_method_configuration": {
    "enabled": [
      "acss_debit"
    ],
    "disabled": [
      "acss_debit"
    ],
    "include_platform_defaults": true
  }
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Path Parameters

id
string
required

The ID of the checkout configuration

Example:

"ch_xxxxxxxxxxxxxxx"

Response

A successful response

A checkout configuration object.
Can be used to create a reusable custom configuration for a checkout, including attaching plans, affiliates and custom metadata to the checkout.
This configuration can be re-used by multiple users.
All successful payments and memberships resulting from a checkout will contain the passed metadata.
id
string
required

The ID of the checkout configuration

Example:

"ch_xxxxxxxxxxxxxxx"

company_id
string
required

The ID of the company to use for the checkout configuration

mode
enum<string>
required

The mode of the checkout session.

Available options:
payment,
setup
currency
enum<string> | null
required

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.

Available options:
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
plan
object
required

The plan to use for the checkout configuration

affiliate_code
string | null
required

The affiliate code to use for the checkout configuration

metadata
object
required

The metadata to use for the checkout configuration

redirect_url
string | null
required

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

purchase_url
string
required

A URL you can send to customers to complete a checkout. It looks like /checkout/plan_xxxx?session={id}

payment_method_configuration
object
required

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.