Payments
Payments API
Create online, hosted, keyed, split and terminal payments with clear transaction tracking.
Payment intentsHosted checkoutTransactions
Payments API map
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /payment-intents | Create a payment intent and receive client/server references. |
| POST | /payments | Create a hosted payment checkout. |
| POST | /keyed-payments | Create a server-side payment using an existing NeroPay payment method id. |
| POST | /split-payments | Create a payment with multiple split recipients where enabled. |
| POST | /terminal/payments | Send a payment to a registered terminal reader. |
| GET | /transactions | List payment transactions. |
| GET | /transactions/{id} | Retrieve one transaction. |
| POST | /transactions/{id}/refund | Refund a transaction. |
| POST | /transactions/{id}/cancel | Cancel a pending transaction. |
Common payment fields
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | decimal | Yes | Amount in major units, for example 15.99. |
currency | string | Yes | ISO currency code, for example GBP. |
description/details | string | Optional | Human readable payment description. |
reference/identifier | string | Optional | Your order, invoice or cart reference. Must be unique when used for reconciliation. |
customer | object | Optional | Customer name, email and phone where supported. |
connect_application_fee | decimal | Optional | Platform fee for NeroConnect platforms, when the endpoint supports it. |
metadata | object | Optional | Short non-sensitive references such as order id or source system. |
Basic PHP flow
Most integrations start by creating a payment intent, showing the customer a checkout or confirmation page, then listening for webhook events and retrieving the final 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": "pi_nero_123",
"status": "pending",
"amount": "15.99",
"currency": "GBP",
"transaction": {
"id": 6636598,
"status": "pending",
"reference": "ORDER-1001"
}
}
}
Payment status values
| Status | Meaning |
|---|---|
pending | Payment record exists but payment has not completed yet. |
requires_payment_method | Customer needs to provide or confirm a payment method. |
processing | Payment is being processed. |
succeeded | Payment completed successfully. |
cancelled | Payment was cancelled. |
refunded | Transaction has been fully or partially refunded. |