Create Customer

Create a new customer for your business.

Creates a new customer record associated with your business. Customers are used to track transactions and manage user data.

circle-info

You can also create customers implicitly by using the "with customer" variants of the on-ramp, off-ramp, buy, and sell endpoints.

Endpoint

POST /v1/customers

Authentication

Header
Value

x-api-key

Your API key

Request body

Field
Type
Required
Description

firstName

string

No

Customer's first name

lastName

string

No

Customer's last name

email

string

Yes

Customer's email address (must be unique per environment)

phoneNumber

string

Yes

Customer's phone number (E.164 format)

Example request

curl -X POST https://ramp-api.ivorypay.io/api/v1/customers \
  -H "x-api-key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Amina",
    "lastName": "Okafor",
    "email": "amina@example.com",
    "phoneNumber": "+2348012345678"
  }'

Example response

Response fields

Field
Type
Description

id

string

Unique customer UUID

refCode

string

IvoryPay-generated 10-character customer reference

firstName

string

Customer's first name

lastName

string

Customer's last name

email

string

Customer's email

phoneNumber

string

Customer's phone number

context

string

Environment (TEST or LIVE)

createdAt

string

ISO 8601 creation timestamp

Error cases

Scenario
Description

Duplicate email

A customer with this email already exists in this environment

Last updated