NeroPay Docs
API & Integrations

Payments API

Payments

Payments API

Create online, hosted, keyed, split and terminal payments with clear transaction tracking.

Payment intentsHosted checkoutTransactions

Payments API map

MethodEndpointPurpose
POST/payment-intentsCreate a payment intent and receive client/server references.
POST/paymentsCreate a hosted payment checkout.
POST/keyed-paymentsCreate a server-side payment using an existing NeroPay payment method id.
POST/split-paymentsCreate a payment with multiple split recipients where enabled.
POST/terminal/paymentsSend a payment to a registered terminal reader.
GET/transactionsList payment transactions.
GET/transactions/{id}Retrieve one transaction.
POST/transactions/{id}/refundRefund a transaction.
POST/transactions/{id}/cancelCancel a pending transaction.

Common payment fields

ParameterTypeRequiredDescription
amountdecimalYesAmount in major units, for example 15.99.
currencystringYesISO currency code, for example GBP.
description/detailsstringOptionalHuman readable payment description.
reference/identifierstringOptionalYour order, invoice or cart reference. Must be unique when used for reconciliation.
customerobjectOptionalCustomer name, email and phone where supported.
connect_application_feedecimalOptionalPlatform fee for NeroConnect platforms, when the endpoint supports it.
metadataobjectOptionalShort 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

StatusMeaning
pendingPayment record exists but payment has not completed yet.
requires_payment_methodCustomer needs to provide or confirm a payment method.
processingPayment is being processed.
succeededPayment completed successfully.
cancelledPayment was cancelled.
refundedTransaction has been fully or partially refunded.