---
title: "Create a customer"
method: POST
path: "/customers"
tags: ["Customers"]
---

# Create a customer

`POST /customers`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/customers`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `vault`, `vault:customers`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/customers/post.ts> (a function with typed inputs; its response is checked against the schema)

<a href="https://www.checkout.com/docs/payments/store-and-manage-credentials" target="_blank">Store a customer's details in a customer object to reuse in future payments</a>. When creating a customer, you can link payment instruments – the customer `id` returned can be passed as a source when making a payment. <br/><br> **NOTE:** Specify a `default` instrument, otherwise the `instruments` array will not be saved on creation.

## Request body

- StoreCustomerRequest: Create a customer
  - `email` string, email, required: The customer's email address
  - `name` string: The customer's name
  - `phone` PhoneNumber: A phone number
    - `country_code` string: The international <a href="https://www.checkout.com/docs/resources/codes/country-codes" target="_blank">country calling code</a>. Required if `source.type` is `tamara`.
    - `number` string: The phone number. Required if `source.type` is `tamara`.
  - `metadata` object: Allows you to store additional information about a customer. You can include a maximum of 20 key-value pairs. Each key and value can be up to 100 characters long.
  - `default` string: The ID of the instrument you want to set as this customer's default instrument

## Response `201`

Customer created successfully

- StoreCustomerResponse: Customer created successfully
  - `id` string, required: The customer's unique identifier

## Other responses

- `401`: Unauthorized
- `409`: A concurrent update conflict occurred. Retry the request.
- `422`: Invalid data was sent
- `500`: Internal Error

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
