Create a customer

Changed on

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

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

Headers

merchantstring required

Merchant ID

Request body

firstNamestring required

Customer's first name. Max of 50 characters.

lastNamestring required

Customer's last name. Max of 50 characters.

emailstring required

A valid email address that belongs to customer. Max of 255 characters.

genderstring

Customer gender. Supported values are male or female.

homePhonestring

Customer home phone number. Max of 50 characters.

mobilePhonestring

Customer mobile phone number. Max of 50 characters. Numeric only, country code without "+"

companyNamestring

The company name if the company is registered as a customer. Max of 100 characters.

dateOfBirthstring

Customer's date of birth. Supported format is YYYY-MM-DD.

referenceCodestring

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.

metadataobject

Store additional data about the customer object using key/value pairs format.

customerNumberstring

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

idstring
numberstring
referenceCodeunknown
firstNamestring
lastNamestring
emailstring
companyNameunknown
mobilePhoneunknown
homePhoneunknown
genderunknown
dateOfBirthunknown
createdOnstring
addressunknown

Example response

{
  "id": "55220ffc-bc5a-4f50-adaf-fa58c061ebd1",
  "number": "EZY213000",
  "firstName": "Jane",
  "lastName": "Doe",
  "email": "Jane.Doe@gmail.com",
  "createdOn": "2019-03-10T20:10:54.895",
  "metadata": {
    "foo": "bar"
  }
}

Changes