Commerce
Customers and Categories
Use customers and categories to organise orders, products and POS workflows.
CustomersCategoriesNeroPOS
Customers
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /customers | List customers. |
| POST | /customers | Create customer. |
| GET | /customers/{id} | Retrieve customer where enabled. |
| PATCH | /customers/{id} | Update customer where enabled. |
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Customer full name. |
email | email string | Optional | Customer email address. |
phone | string | Optional | Customer phone number. |
address1 | string | Optional | Address line 1. |
city | string | Optional | City. |
postcode | string | Optional | Postcode. |
'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $secretKey,
'Accept: application/json',
'Content-Type: application/json',
'X-NeroPay-Timestamp: ' . $timestamp,
'X-NeroPay-Signature: ' . $signature,
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
],
CURLOPT_POSTFIELDS => $rawBody,
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
{
"success": true,
"data": {
"id": 1001,
"name": "Jane Customer",
"email": "jane@example.com",
"phone": "01234567890",
"created_at": "2026-04-22T10:00:00Z"
}
}
true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $secretKey,
'Accept: application/json',
],
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
{
"success": true,
"data": [
{
"id": 1001,
"name": "Jane Customer",
"email": "jane@example.com"
}
]
}
Categories
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /categories | List categories. |
| POST | /categories | Create category. |
| DELETE | /categories/{id} | Delete category if allowed. |
'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $secretKey,
'Accept: application/json',
'Content-Type: application/json',
'X-NeroPay-Timestamp: ' . $timestamp,
'X-NeroPay-Signature: ' . $signature,
'Idempotency-Key: ' . bin2hex(random_bytes(16)),
],
CURLOPT_POSTFIELDS => $rawBody,
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $response;
{
"success": true,
"data": {
"id": 20,
"name": "Drinks",
"sort_order": 1,
"is_active": 1
}
}
{
"success": false,
"error": {
"code": "validation_failed",
"message": "The name field is required.",
"details": {
"amount": [
"The amount field is required."
]
}
}
}