---
title: "Create a customer"
method: POST
path: "/billing/customers"
---

# Create a customer

`POST /billing/customers`

## Request

- Base URL: `https://api-sandbox.ezypay.com/v2`
- URL: `https://api-sandbox.ezypay.com/v2/billing/customers`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://identity-sandbox.ezypay.com/token`

Create a customer. The system does not check for duplications when a new customer is created.

## Headers

- `merchant` string, required

## Request body

- object
  - `firstName` string, required: Customer's first name. Max of 50 characters.
  - `lastName` string, required: Customer's last name. Max of 50 characters.
  - `email` string, required: A valid email address that belongs to customer. Max of 255 characters.
  - `gender` string: Customer gender. Supported values are `male` or `female`.
  - `address` object: The customer's address object that holds address details.
    - `address1` string: The first line of the address. Max of 100 characters.
    - `address2` string: The second line of the address. If there are no details for this field, you may leave this field blank. Max of 100 characters.
    - `postalCode` string: The postal code of the address. Max of 20 characters.
    - `city` string: The town/city of the address. Max of 100 characters.
    - `state` string: The state of the address. Max of 100 characters.
    - `countryCode` string: Two letter ISO 3166-1 alpha-2 country code.
  - `homePhone` string: Customer home phone number. Max of 50 characters.
  - `mobilePhone` string: Customer mobile phone number. Max of 50 characters. Numeric only, country code without "+"
  - `companyName` string: The company name if the company is registered as a customer. Max of 100 characters.
  - `dateOfBirth` string: Customer's date of birth. Supported format is YYYY-MM-DD.
  - `referenceCode` string: Reference code that can be defined by you. This can be used to store a code used by your application to identify the customer. Max of 30 characters.
  - `metadata` object: Store additional data about the customer object using key/value pairs format.
  - `customerNumber` string: Specify an existing unique customer number to associate this customer with an existing customer of the same number. If this is a new customer, leave this field blank and a new unique customer number will be auto-generated and associated to this customer.

## Response `200`

200

- object
  - `id` string
  - `number` string
  - `referenceCode` unknown
  - `firstName` string
  - `lastName` string
  - `email` string
  - `companyName` unknown
  - `mobilePhone` unknown
  - `homePhone` unknown
  - `gender` unknown
  - `dateOfBirth` unknown
  - `createdOn` string
  - `address` unknown
  - `metadata` object
    - `foo` string

## Changes

- **2026-11-03** `924be4030f56`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ezypay/apis/vault/changes/billing/customers/post.md)

---

[API](https://skmtc.dev/ezypay/apis/vault.md) - [All operations](https://skmtc.dev/ezypay/apis/vault/llms.txt) - [OpenAPI document](https://skmtc.dev/ezypay/apis/vault/revisions/924be4030f56?raw)
