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

const client = new Whop({
  appID: 'app_xxxxxxxxxxxxxx',
  apiKey: 'My API Key',
});

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

console.log(checkoutConfiguration.id);
{
  "id": "ch_xxxxxxxxxxxxxxx",
  "company_id": "<string>",
  "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>"
}

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

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}