# Create Customer Session

Creates a customer session for enrolling and managing payment methods. Use this to save cards, wallets, and other payment methods for future use. Requires a `customer_id` from [Create Customer](/reference/customers/create-customer).

**POST** `/customers/sessions`

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

Create Customer Session

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Body

Content type: `application/json`

- `account_id` (string, required)
  The unique identifier of the account. You find this information on [the WHITELABEL dashboard](https://dashboard.whitelabel.com/) (UUID, 36 chars).
- `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY", required)
  The customer's country  (MAX 2; MIN 2; [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
- `customer_id` (string, required)
  The unique identifier of the customer, created using the [Create Customer](https://docs.whitelabel.com/reference/create-customer) endpoint (UUID, 36 chars).
- `callback_url` (string)
  The URL to redirect your customer after the enrollment is made in the provider's environment (MAX 526; MIN 3).
- `checkout_id` (string)
  The unique identifier (UUID) of the Custom Checkout to use for this enrollment session. Optional. When omitted, the session uses the account's default checkout.

Example:

```json
{
  "account_id": "string",
  "country": "AR",
  "customer_id": "string",
  "callback_url": "string",
  "checkout_id": "string"
}
```

## Responses

### 201

201

- `customer_session` (string)
- `customer_id` (string)
- `country` (string)
- `callback_url` (string)
- `created_at` (string)
- `checkout_id` (string)

Example:

```json
{
  "customer_session": "7dd71f21-9e4c-439a-9c6d-58f240bd28df",
  "customer_id": "ae106483-65ee-463b-8782-9794022b3112",
  "country": "US",
  "callback_url": "https://www.google.com/?customerSession=7dd71f21-9e4c-439a-9c6d-58f240bd28df",
  "created_at": "2025-05-07T20:00:18.721786Z",
  "checkout_id": "6822f80c-684e-41a3-8628-78963d3d60f7"
}
```

### 400

400

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

Example:

```json
{
  "code": "INVALID_REQUEST",
  "messages": [
    "Invalid request"
  ]
}
```

### 401

401

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

Example:

```json
{
  "code": "INVALID_CREDENTIALS",
  "messages": [
    "Invalid credentials"
  ]
}
```

### 403

403

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

Example:

```json
{
  "code": "AUTHORIZATION_REQUIRED",
  "messages": [
    "The merchant has no authorization to use this API."
  ]
}
```