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.
Endpoint
POST /v1/customersAuthentication
Accepts either a merchant API key or a business-user JWT.
Authorization
<api_key> or Bearer <jwt>
Request body
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 "Authorization: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Amina",
"lastName": "Okafor",
"email": "amina@example.com",
"phoneNumber": "+2348012345678"
}'const response = await fetch("https://ramp-api.ivorypay.io/api/v1/customers", {
method: "POST",
headers: {
"Authorization": "your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
firstName: "Amina",
lastName: "Okafor",
email: "amina@example.com",
phoneNumber: "+2348012345678",
}),
});
const data = await response.json();
console.log(data);Example response
Response fields
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
Duplicate email
A customer with this email already exists in this environment
Last updated