import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list({
company_id: 'biz_xxxxxxxxxxxxxx',
})) {
console.log(checkoutConfigurationListResponse.id);
}{
"data": [
{
"id": "ch_xxxxxxxxxxxxxxx",
"company_id": "<string>",
"mode": "payment",
"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
}
}
],
"page_info": {
"end_cursor": "<string>",
"start_cursor": "<string>",
"has_next_page": true,
"has_previous_page": true
}
}Lists checkout configurations
Required permissions:
checkout_configuration:basic:readimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list({
company_id: 'biz_xxxxxxxxxxxxxx',
})) {
console.log(checkoutConfigurationListResponse.id);
}{
"data": [
{
"id": "ch_xxxxxxxxxxxxxxx",
"company_id": "<string>",
"mode": "payment",
"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
}
}
],
"page_info": {
"end_cursor": "<string>",
"start_cursor": "<string>",
"has_next_page": true,
"has_previous_page": true
}
}The app API key from an app from the /dashboard/developer page
Returns the elements in the list that come after the specified cursor.
Returns the elements in the list that come before the specified cursor.
Returns the first n elements from the list.
42
Returns the last n elements from the list.
42
The ID of the company to list checkout configurations for
"biz_xxxxxxxxxxxxxx"
The direction to sort the checkout configurations by
asc, desc The ID of the plan to filter checkout configurations by
"plan_xxxxxxxxxxxxx"
The maximum creation date to filter by
"2023-12-01T05:00:00.401Z"
The minimum creation date to filter by
"2023-12-01T05:00:00.401Z"
A successful response
The connection type for CheckoutSession.
A list of nodes.
Show child attributes
The ID of the checkout configuration
"ch_xxxxxxxxxxxxxxx"
The ID of the company to use for the checkout configuration
The mode of the checkout session.
payment, setup The plan to use for the checkout configuration
Show child attributes
The internal ID of the plan.
"plan_xxxxxxxxxxxxx"
Shows or hides the plan from public/business view.
visible, hidden, archived, quick_link Indicates if the plan is a one time payment or recurring.
renewal, one_time This is the release method the business uses to sell this plan.
buy_now, waitlist The respective currency identifier for the plan.
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 The interval at which the plan charges (renewal plans).
42
The interval at which the plan charges (expiration plans).
42
The price a person has to pay for a plan on the initial purchase.
6.9
The price a person has to pay for a plan on the renewal purchase.
6.9
The number of free trial days added before a renewal plan.
42
The affiliate code to use for the checkout configuration
The metadata to use for the checkout configuration
The URL to redirect the user to after the checkout configuration is created
A URL you can send to customers to complete a checkout. It looks like /checkout/plan_xxxx?session={id}
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.
Show child attributes
An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.
The different types of payment methods that can be used.
acss_debit, affirm, afterpay_clearpay, alipay, alma, amazon_pay, apple_pay, au_becs_debit, bacs_debit, bancontact, billie, blik, boleto, card, cashapp, crypto, eps, fpx, giropay, google_pay, grabpay, ideal, kakao_pay, klarna, konbini, kr_card, link, mobilepay, multibanco, naver_pay, nz_bank_account, oxxo, p24, pay_by_bank, payco, paynow, pix, promptpay, revolut_pay, samsung_pay, satispay, sepa_debit, sofort, swish, twint, us_bank_account, wechat_pay, zip, bizum, capchase_pay, kriya, mondu, ng_wallet, paypay, sequra, scalapay, vipps, custom, customer_balance, gopay, mb_way, ng_bank, ng_bank_transfer, ng_card, ng_market, ng_ussd, paypal, payto, qris, rechnung, south_korea_market, kr_market, shopeepay, upi, sunbit, netbanking, id_bank_transfer, demo_pay, shop_pay, sezzle, coinbase, splitit, platform_balance, apple, venmo, unknown An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.
The different types of payment methods that can be used.
acss_debit, affirm, afterpay_clearpay, alipay, alma, amazon_pay, apple_pay, au_becs_debit, bacs_debit, bancontact, billie, blik, boleto, card, cashapp, crypto, eps, fpx, giropay, google_pay, grabpay, ideal, kakao_pay, klarna, konbini, kr_card, link, mobilepay, multibanco, naver_pay, nz_bank_account, oxxo, p24, pay_by_bank, payco, paynow, pix, promptpay, revolut_pay, samsung_pay, satispay, sepa_debit, sofort, swish, twint, us_bank_account, wechat_pay, zip, bizum, capchase_pay, kriya, mondu, ng_wallet, paypay, sequra, scalapay, vipps, custom, customer_balance, gopay, mb_way, ng_bank, ng_bank_transfer, ng_card, ng_market, ng_ussd, paypal, payto, qris, rechnung, south_korea_market, kr_market, shopeepay, upi, sunbit, netbanking, id_bank_transfer, demo_pay, shop_pay, sezzle, coinbase, splitit, platform_balance, apple, venmo, unknown Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.
Information to aid in pagination.
Show child attributes
When paginating forwards, the cursor to continue.
When paginating backwards, the cursor to continue.
When paginating forwards, are there more items?
When paginating backwards, are there more items?
Was this page helpful?