Skip to content
Wire Ghapi

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.
POST/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 POST
Sample response
{
  "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.
GET/customer
curl https://api.wiregh.com/customer?perPage=1 \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GET
Sample response
{
  "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_code starting with CUS_.
GET/customer/:email_or_code
curl https://api.wiregh.com/customer/ama@email.com \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-X GET
Sample response
{
  "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"
  }
}