# Create Checkout

<Note>This API is in **Beta**. Endpoints and schemas may change without prior notice.</Note>

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](/reference/checkout-builder/publish-checkout-configuration). It is never created as the account's default.

The response's top-level `id` is the `checkout_code` used by the [Fetch](/reference/checkout-builder/fetch-checkout-configuration), [Publish](/reference/checkout-builder/publish-checkout-configuration), and [Manage Checkout Lifecycle](/reference/checkout-builder/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`

Base URL: `https://api-sandbox.whitelabel.com/v1`

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`.

## Authorization

- PUBLIC-API-KEY (apiKey in header)
- PRIVATE-SECRET-KEY (apiKey in header)
- X-Account-Code (apiKey in header)

## Header parameters

- `X-Idempotency-Key` (string)
  Optional client key, up to 64 characters. Best-effort; re-sending the same key is not guaranteed to be de-duplicated.

## Body

Content type: `application/json`

- `name` (string, required)
  Checkout name. Required, non-blank, and unique per account (a duplicate name is rejected with 409).
- `description` (string)
  Optional free-text description.

Example:

```json
{
  "name": "string",
  "description": "string"
}
```

## Responses

### 201

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.

- `id` (string)
  Checkout identifier (UUID). Use it as the checkout_code in the fetch, publish, and lifecycle endpoints.
- `name` (string)
  Checkout name.
- `description` (string)
  Checkout description.
- `is_default` (boolean)
  Whether this checkout is the account's default. A newly created checkout is never the default.
- `is_active` (boolean)
  Whether the checkout is active (serving traffic).
- `created_at` (string<date-time>)
  Creation timestamp (ISO-8601).

Example:

```json
{
  "id": "string",
  "name": "string",
  "description": "string",
  "is_default": true,
  "is_active": true,
  "created_at": "1970-01-01T00:00:00.000Z"
}
```

### 400

Missing or blank `name`, or a malformed JSON body.

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "string",
  "messages": [
    "string"
  ]
}
```

### 401

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

### 404

The account has no default checkout to clone from.

### 409

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