Customers
The Customers API lets you keep a record of the people who pay you. A customer is also created for you automatically, by email address, the first time they pay.
Create Customer
Create a customer, or update the saved details of an existing customer with the same email address.
Headers
authorizationStringrequired- Set value to
Bearer YOUR_SECRET_KEY. content-typeStringrequired- Set value to
application/json. idempotency-keyStringoptional- A unique value you choose so a retried request is processed only once. See idempotent requests.
Body parameters
emailStringrequired- Customer's email address.
first_nameStringoptional- Customer's first name.
last_nameStringoptional- Customer's last name.
phoneStringoptional- Customer's phone number.
metadataObjectoptional- Any extra information you want to keep with the customer.
curl https://api.wiregh.com/customer \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "ama@email.com",
"first_name": "Ama",
"last_name": "Mensah",
"phone": "0241234567"
}' \
-X POSTconst response = await fetch('https://api.wiregh.com/customer', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_SECRET_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: 'ama@email.com',
first_name: 'Ama',
last_name: 'Mensah',
phone: '0241234567'
})
});
const result = await response.json();
console.log(result);<?php
$ch = curl_init('https://api.wiregh.com/customer');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode([
'email' => 'ama@email.com',
'first_name' => 'Ama',
'last_name' => 'Mensah',
'phone' => '0241234567',
]),
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_SECRET_KEY',
'Content-Type: application/json',
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);{
"status": true,
"message": "Customer created",
"data": {
"id": 173,
"first_name": "Ama",
"last_name": "Mensah",
"email": "ama@email.com",
"customer_code": "CUS_0ioa2wu1t9hzi2d",
"phone": "0241234567",
"metadata": null,
"risk_action": "default",
"createdAt": "2026-11-09T01:03:40.000Z",
"updatedAt": "2026-11-09T01:03:40.000Z"
}
}List Customers
List the customers on your integration, newest first. Results are paginated.
Headers
authorizationStringrequired- Set value to
Bearer YOUR_SECRET_KEY.
Query parameters
perPageIntegeroptional- Records per page, from 1 to 100. Defaults to 50.
pageIntegeroptional- Page to return. Defaults to 1.
curl https://api.wiregh.com/customer?perPage=1 \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GETconst response = await fetch('https://api.wiregh.com/customer?perPage=1', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_SECRET_KEY'
}
});
const result = await response.json();
console.log(result);<?php
$ch = curl_init('https://api.wiregh.com/customer?perPage=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_SECRET_KEY',
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);{
"status": true,
"message": "Customers retrieved",
"data": [
{
"id": 173,
"first_name": "Ama",
"last_name": "Mensah",
"email": "ama@email.com",
"customer_code": "CUS_0ioa2wu1t9hzi2d",
"phone": "0241234567",
"metadata": null,
"risk_action": "default",
"createdAt": "2026-11-09T01:03:40.000Z",
"updatedAt": "2026-11-09T01:03:40.000Z"
}
],
"meta": {
"total": 2,
"perPage": 1,
"page": 1,
"pageCount": 2
}
}Fetch Customer
Get the details of a customer by email address or customer code.
Headers
authorizationStringrequired- Set value to
Bearer YOUR_SECRET_KEY.
Path parameters
email_or_codeStringrequired- The customer's email address, or the
customer_codestarting withCUS_.
curl https://api.wiregh.com/customer/ama@email.com \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GETconst response = await fetch('https://api.wiregh.com/customer/ama@email.com', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_SECRET_KEY'
}
});
const result = await response.json();
console.log(result);<?php
$ch = curl_init('https://api.wiregh.com/customer/ama@email.com');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_SECRET_KEY',
],
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($result);{
"status": true,
"message": "Customer retrieved",
"data": {
"id": 173,
"first_name": "Ama",
"last_name": "Mensah",
"email": "ama@email.com",
"customer_code": "CUS_0ioa2wu1t9hzi2d",
"phone": "0241234567",
"metadata": null,
"risk_action": "default",
"createdAt": "2026-11-09T01:03:40.000Z",
"updatedAt": "2026-11-09T01:03:40.000Z"
}
}