Create Checkout

This API is in Beta. Endpoints and schemas may change without prior notice.

The new checkout is born PUBLISHED as a clone of the account’s default: payment methods (including icon/name overrides and required-field condition sets) are copied; general settings and styling inherit the account baseline until the checkout’s first Publish. It is never created as the account’s default.

The response’s top-level id is the checkout_code used by the Fetch, Publish, and Manage Checkout Lifecycle endpoints.

name is required, non-blank, and unique per account; a duplicate is rejected with 409. If the account has no default checkout to clone from, the request is rejected with 404.

POST/checkouts

Creates a new custom checkout as a published clone of the account’s default checkout: payment methods (including icon/name overrides and required-field condition sets) are copied from the default; general settings and styling inherit the account baseline until the checkout’s first publish. The new checkout is born with status PUBLISHED and is never the account’s default. The identifier is exposed as the top-level id.

Header Parameters

X-Idempotency-Keystring

Optional client key, up to 64 characters. Best-effort; re-sending the same key is not guaranteed to be de-duplicated.

Body application/json

namestringrequired

Checkout name. Required, non-blank, and unique per account (a duplicate name is rejected with 409).

descriptionstring

Optional free-text description.

Response

The created checkout. Born PUBLISHED as a clone of the account’s default; is_default is always false on creation. Use id as the checkout_code in the other Checkout Builder endpoints.

idstring

Checkout identifier (UUID). Use it as the checkout_code in the fetch, publish, and lifecycle endpoints.

namestring

Checkout name.

descriptionstring

Checkout description.

is_defaultboolean

Whether this checkout is the account’s default. A newly created checkout is never the default.

is_activeboolean

Whether the checkout is active (serving traffic).

created_atstring<date-time>

Creation timestamp (ISO-8601).

Missing or blank name, or a malformed JSON body.

codestring
messagesstring[]

Not authenticated, or the account is not in the beta allowlist.

The account has no default checkout to clone from.

A checkout with the same name already exists for the account.

Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/checkouts" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: <X-Idempotency-Key>" \
  -H "PUBLIC-API-KEY: <PUBLIC-API-KEY>" \
  -H "PRIVATE-SECRET-KEY: <PRIVATE-SECRET-KEY>" \
  -H "X-Account-Code: <X-Account-Code>" \
  -d '{
  "name": "string",
  "description": "string"
}'
Response
{
  "id": "string",
  "name": "string",
  "description": "string",
  "is_default": true,
  "is_active": true,
  "created_at": "1970-01-01T00:00:00.000Z"
}