NeroPay Docs
API & Integrations

Customers and Categories

Commerce

Customers and Categories

Use customers and categories to organise orders, products and POS workflows.

CustomersCategoriesNeroPOS

Customers

MethodEndpointPurpose
GET/customersList customers.
POST/customersCreate customer.
GET/customers/{id}Retrieve customer where enabled.
PATCH/customers/{id}Update customer where enabled.
ParameterTypeRequiredDescription
namestringYesCustomer full name.
emailemail stringOptionalCustomer email address.
phonestringOptionalCustomer phone number.
address1stringOptionalAddress line 1.
citystringOptionalCity.
postcodestringOptionalPostcode.
 '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

MethodEndpointPurpose
GET/categoriesList categories.
POST/categoriesCreate 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."
      ]
    }
  }
}