---
title: "Update a customer"
method: PUT
path: "/billing/customers/{customerId}"
---

# Update a customer

`PUT /billing/customers/{customerId}`

## Request

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

Update an existing customer's personal details.

## Path parameters

- `customerId` string, required

## Headers

- `merchant` string, required

## Request body

- object
  - `email` string, required: A valid email address that belongs to the customer. Max of 255 characters.
  - `firstName` string, required: Customer's first name. Max of 50 characters.
  - `lastName` string, required: Customer's last name. Max of 50 characters.
  - `gender` string: Customer gender. Supported values are `male` or `female`.
  - `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 "+".
  - `referenceCode` string: The reference code of the customer. A unique identifier from a third-party software integration. Max of 30 characters.
  - `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.
  - `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.

## 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` string
  - `createdOn` string
  - `address` unknown
  - `metadata` object
    - `foo` string

## Other responses

- `400`: 400

## Changes

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

[Operation history](https://skmtc.dev/ezypay/apis/vault/changes/billing/customers/:customerId/put.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)
