NeroPay Docs
API & Integrations

Keyed Payments

Payments

Keyed Payments

Use keyed payments for approved saved-payment-method flows without sending raw card data.

Server-sideTokenised methodNo raw card data

Create keyed payment

POST/keyed-payments

Creates a server-side payment using an existing neropay_payment_method_id.

ParameterTypeRequiredDescription
amountdecimalYesPayment amount in major units.
currencystringYesCurrency code.
neropay_payment_method_idstringYesTokenised NeroPay payment method id. Raw card data is not accepted.
descriptionstringOptionalPayment description.
referencestringOptionalYour order or invoice reference.
connect_application_feedecimalOptionalNeroConnect platform fee where applicable.
 '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": "pay_nero_keyed_123",
    "status": "succeeded",
    "amount": "10.00",
    "currency": "GBP",
    "transaction": {
      "id": 6636600,
      "status": "succeeded"
    }
  }
}
{
  "success": false,
  "error": {
    "code": "resource_not_found",
    "message": "The payment method was not found for this merchant.",
    "details": null
  }
}