NeroPay Docs
API & Integrations

Transactions, Refunds and Cancels

Payments

Transactions, Refunds and Cancels

Use transaction endpoints for reconciliation, customer support and post-payment actions.

TransactionsRefundsCancels

Transaction endpoints

MethodEndpointPurpose
GET/transactionsList transactions with pagination and filters.
GET/transactions/{id}Retrieve one transaction.
POST/transactions/{id}/refundCreate a full or partial refund.
POST/transactions/{id}/cancelCancel a pending payment where cancellation is allowed.

List transactions

 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": 6636598,
      "trx": "NP-ORDER1001",
      "status": "succeeded",
      "amount": "15.99",
      "currency": "GBP",
      "created_at": "2026-04-22T02:37:11Z"
    },
    {
      "id": 6636599,
      "trx": "NP-ORDER1002",
      "status": "pending",
      "amount": "9.99",
      "currency": "GBP",
      "created_at": "2026-04-22T03:10:11Z"
    }
  ]
}

Retrieve one transaction

 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": 6636598,
    "trx": "NP-ORDER1001",
    "status": "succeeded",
    "amount": "15.99",
    "currency": "GBP",
    "remark": "make_payment",
    "created_at": "2026-04-22T02:37:11Z"
  }
}

Refund transaction

ParameterTypeRequiredDescription
amountdecimalOptionalRefund amount in major units. Omit for full refund where supported.
reasonstringOptionalUse a short reason such as requested_by_customer.
 '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": "rf_nero_123",
    "transaction_id": 6636598,
    "status": "succeeded",
    "amount": "1.00",
    "currency": "GBP"
  }
}

Cancel transaction

 '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": 6636599,
    "status": "cancelled"
  }
}
CodeWhen it happensHow to fix it
authentication_failedThe bearer secret key is missing, incorrect or disabled.Check the Authorization header and use a server-side secret key.
invalid_signatureA signed write request has a missing or invalid timestamp/signature.Generate the HMAC signature from timestamp + "." + rawBody.
validation_failedA required field is missing or a value is not valid.Check the endpoint parameter table and send JSON with the correct types.
resource_not_foundThe id does not exist for the authenticated merchant or selected connected account.Confirm the id and, for NeroConnect, the NeroPay-Account header.
idempotency_conflictThe same idempotency key was reused with a different body.Retry with the same request body or create a new idempotency key.
account_not_foundThe selected connected account is not assigned to the platform.Use a valid public connected account id such as NPxxxx_12345.