Skip to main content
POST
/
checkout_configurations
Create a checkout configuration
curl --request POST \
  --url https://{defaultHost}/checkout_configurations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "company_id": "biz_xxxxxxxxxxxxxx",
  "plan_id": "plan_xxxxxxxxxxxxx"
}
'
import requests

url = "https://{defaultHost}/checkout_configurations"

payload = {
"company_id": "biz_xxxxxxxxxxxxxx",
"plan_id": "plan_xxxxxxxxxxxxx"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({company_id: 'biz_xxxxxxxxxxxxxx', plan_id: 'plan_xxxxxxxxxxxxx'})
};

fetch('https://{defaultHost}/checkout_configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{defaultHost}/checkout_configurations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'company_id' => 'biz_xxxxxxxxxxxxxx',
'plan_id' => 'plan_xxxxxxxxxxxxx'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{defaultHost}/checkout_configurations"

payload := strings.NewReader("{\n \"company_id\": \"biz_xxxxxxxxxxxxxx\",\n \"plan_id\": \"plan_xxxxxxxxxxxxx\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{defaultHost}/checkout_configurations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"company_id\": \"biz_xxxxxxxxxxxxxx\",\n \"plan_id\": \"plan_xxxxxxxxxxxxx\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{defaultHost}/checkout_configurations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_id\": \"biz_xxxxxxxxxxxxxx\",\n \"plan_id\": \"plan_xxxxxxxxxxxxx\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "company_id": "<string>",
  "currency": "<string>",
  "plan": {
    "id": "<string>",
    "visibility": "<string>",
    "plan_type": "<string>",
    "release_method": "<string>",
    "currency": "<string>",
    "billing_period": 123,
    "expiration_days": 123,
    "initial_price": 123,
    "renewal_price": 123,
    "trial_period_days": 123,
    "three_ds_level": "<string>",
    "adaptive_pricing_enabled": true
  },
  "affiliate_code": "<string>",
  "metadata": {},
  "redirect_url": "<string>",
  "purchase_url": "<string>",
  "three_ds_level": "<string>",
  "payment_method_configuration": {
    "enabled": [
      "<string>"
    ],
    "disabled": [
      "<string>"
    ],
    "include_platform_defaults": true
  }
}
{
"error": {
"type": "<string>",
"message": "<string>"
}
}

Authorizations

Authorization
string
header
required

An account API key, account scoped JWT, app API key, or user OAuth token.

Headers

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-07-08-1"

Body

application/json
company_id
string

Account ID, prefixed biz_.

plan_id
string | null

Existing plan ID, prefixed plan_. Mutually exclusive with plan.

plan
object | null

Plan attributes used to create or find a plan for this checkout configuration. Mutually exclusive with plan_id.

mode
enum<string>

Checkout mode: payment collects payment for a plan now; setup saves payment details without charging. Defaults to payment.

Available options:
payment,
setup
currency
string | null

Currency used for setup-mode payment method availability.

affiliate_code
string | null

Affiliate code to apply to the checkout.

metadata
object | null

Custom key-value metadata copied to payments and memberships.

redirect_url
string | null

URL customers are sent to after checkout.

three_ds_level
string | null

3D Secure behavior for this checkout.

payment_method_configuration
object | null

Payment method overrides for this checkout. null uses the plan or platform defaults.

Response

checkout configuration created

id
string
required

Checkout configuration ID, prefixed ch_.

created_at
string
required

When the checkout configuration was created, as an ISO 8601 timestamp.

updated_at
string
required

When the checkout configuration was last updated, as an ISO 8601 timestamp.

company_id
string
required

Account ID, prefixed biz_.

mode
enum<string>
required

Checkout mode: payment collects payment now; setup saves payment details for later.

Available options:
payment,
setup
currency
string | null

Currency used for setup-mode payment method availability; defaults to usd when omitted.

plan
object | null

Plan used for payment checkout. null in setup mode.

affiliate_code
string | null

Affiliate code applied at checkout, or null when none is set.

metadata
object | null

Custom key-value metadata copied to payments and memberships. null without the checkout_configuration:basic:read scope.

redirect_url
string | null

URL customers are sent to after checkout, or null when no redirect is configured.

purchase_url
string | null

Checkout URL you can send to customers.

three_ds_level
string | null

3D Secure behavior for this checkout, or null to use the account default.

payment_method_configuration
object | null

Payment method overrides for this checkout. null when it uses the plan or platform defaults.