v1

latestOpenAPI 3.1.02026-07-228956435.8 KB
Customers

Create a customer

Creates a customer in the live or test mode of the API key used. At least one of email or tax_id must be provided; every other field is optional. If a tax_id is provided, both its type and value are required. Values are normalized before being stored: email and address.country are lowercased, dots and hyphens are stripped from RUTs, and RFCs are uppercased.

post/customers

Request body

emailstring

Customer's email. At least one of email or tax_id is required.

metadataobject

Set of key-value pairs that you can attach to an object. Useful for storing additional information about the object in a structured format.

namestring

Customer's full name or business name.

phonestring

Customer's phone number in E.164 format, including the country code (for example +56911111111).

Example request

{
  "address": {
    "city": "Santiago",
    "country": "CL",
    "line1": "Av. Providencia 123",
    "line2": "Depto 45",
    "postal_code": "7500000",
    "state": "RM"
  },
  "email": "jared@piedpiper.com",
  "metadata": {
    "order_id": "12345"
  },
  "name": "Test Customer 1",
  "phone": "+56911111111",
  "tax_id": {
    "type": "cl_rut",
    "value": "11111111-1"
  }
}

Response

Customer created.

idstring required

Unique identifier of the customer.

object'customer' required

Type of the object. Always customer.

created_atstring date-time required

ISO 8601 datetime, in UTC, of when the customer was created.

emailstring nullable required

Customer's email, stored in lowercase. null if not provided.

metadataobject required

Set of key-value pairs that you can attach to an object. Useful for storing additional information about the object in a structured format.

mode'live' | 'test' required

Mode of the customer, matching the mode of the API key used to create it. One of live or test.

namestring nullable required

Customer's full name or business name. null if not provided.

phonestring nullable required

Customer's phone number in E.164 format, including the country code (for example +56911111111). null if not provided.

Example response

{
  "id": "cus_0ujsswThIGTUYm2K8FjOOfXtY1K",
  "address": {
    "city": "Santiago",
    "country": "cl",
    "line1": "Av. Providencia 123",
    "line2": "Depto 45",
    "postal_code": "7500000",
    "state": "RM"
  },
  "created_at": "2026-01-15T14:30:00Z",
  "email": "jared@piedpiper.com",
  "metadata": {
    "order_id": "12345"
  },
  "mode": "live",
  "name": "Test Customer 1",
  "phone": "+56911111111",
  "tax_id": {
    "type": "cl_rut",
    "value": "111111111"
  }
}