Direct integration

Integrate Nelo Checkout directly against our REST API, without a platform plugin.

Integrate Nelo Checkout directly through our REST API, without a platform plugin.

Use this integration for custom storefronts or ecommerce platforms where Nelo does not provide a native plugin.

For endpoint and field details, see the API reference.

Integration flow

  1. The shopper selects Nelo at checkout.
  2. Your backend creates an order.
  3. Redirect the shopper to the returned redirectUrl.
  4. The shopper completes the Nelo flow.
  5. Nelo redirects the shopper to your redirectConfirmUrl or redirectCancelUrl.
  6. Your backend verifies the order status.
  7. Capture the authorization when you are ready to charge.

Important: Do not use the browser redirect as confirmation of authorization. Always verify the order status through the API or webhook before fulfilling the order.

All amounts are expressed in minor units. For example, 249900 represents $2,499.00 MXN.

Authentication

Send your secret token on every call: Authorization: Bearer <secret token>. Nelo issues it when your store is set up, and it identifies your store, so call the API only from your backend, never from a browser, app or POS terminal. If it leaks, ask us to rotate it; the old token stops working at once. Promotional-message endpoints take the publishable token instead, which is safe to use in the browser.

Order identifiers

Nelo orders use three main identifiers:

IdentifierPurpose
referenceYour internal order or business reference. It does not need to be unique.
platformPaymentIdIdentifies a specific payment attempt. Reuse it when retrying the same create request.
orderUuidNelo's unique order identifier. Store it for capture, void, and refund operations.

If you do not have the orderUuid, for example after a timed-out create request, use Find orders with platformPaymentId or reference.

Redirects

Nelo redirects shoppers to the URLs provided when creating the order:

  • redirectConfirmUrl when the Nelo flow completes.
  • redirectCancelUrl when the shopper cancels.

Nelo adds orderUuid and reference as query parameters to redirectConfirmUrl, and reference to redirectCancelUrl, keeping any parameters you already included. redirectConfirmUrl also carries paymentUuid, which repeats orderUuid. Use them to look the order up, not as proof of payment.

Order status

Use Retrieve a payment with the orderUuid, or Find orders with your reference or platformPaymentId, to verify the current status.

StatusMeaning
CREATEDApplication started but not authorized.
AUTHORIZEDApproved and ready to capture.
CAPTUREDAuthorization captured; a partial refund keeps this status.
CANCELEDOrder was voided, declined, or abandoned.
REFUNDEDYour refunds cover the full amount.

Authorizations expire after 7 days if they are not captured, and the order moves to CANCELED.

Capture, void, and refund

Use Capture when you are ready to charge an authorized order.

If your business fulfills immediately, you can enable shouldAutoCapture when creating the order.

Use Void to release an authorization you do not intend to capture.

Use Refund for full or partial refunds. Refunds aren't allowed after 90 days of order creation.

Always provide an idempotencyKey when creating a refund so the request can be retried safely.

Order amounts

Retrieve a payment returns the financial details of an order, including the amount, Nelo fee, tax, netAmount, and refunds.

It also returns the order's current status.

Webhooks

Nelo sends a POST request to your callback URL when an order is authorized or canceled. Set the URL for your store during onboarding, or per order with order.merchantCallbackUrl when you create the order. It must be a public https URL; Nelo does not follow redirects.

Events

EventSent when
order.authorizedThe shopper confirmed and the order is authorized. Its status is AUTHORIZED, or CAPTURED when shouldAutoCapture is true, since the capture happens right away.
order.canceledThe order is voided, declined, abandoned by the shopper, or its authorization expires. It can also arrive after order.authorized if a captured order is later canceled.

No event is sent for captures or refunds.

Request

POST /your/callback/path HTTP/1.1
Content-Type: application/json
X-Nelo-Event: order.authorized
X-Nelo-Signature: <Base64 signature>
{
  "event": "order.authorized",
  "orderUuid": "4f6c2a1e-8b3d-4c7a-9e21-5d0b7a3c9f10",
  "reference": "ORDER-1042",
  "platformPaymentId": "pay_8f31c0",
  "occurredAt": "2026-09-04T22:49:25.955Z"
}
FieldDescription
eventorder.authorized or order.canceled. The X-Nelo-Event header repeats it so you can route the request before reading the body, but only the body is signed, so act on this field.
orderUuidNelo's order identifier.
referenceThe reference you sent when creating the order.
platformPaymentIdThe platformPaymentId you sent when creating the order.
occurredAtWhen this delivery attempt was sent, in ISO 8601 UTC. It changes on every retry, so do not use it to deduplicate.

Responding and retries

Respond with any 2xx status within 8 seconds and process slower work asynchronously. Nelo retries timeouts, connection errors and 5xx responses up to 10 times with exponential backoff (starting at 1 second and doubling, up to 30 seconds between attempts), then tries the whole sequence again a few minutes later. A 4xx response is not retried.

Delivery is at least once and events may arrive out of order. Make your handler idempotent, deduplicate on:

orderUuid + event

and verify the current order state before taking action.

If your firewall allowlists senders, ask us for the IP addresses webhooks are sent from.

Signature verification

Every webhook request includes an X-Nelo-Signature header: a Base64-encoded SHA256withRSA signature (RSA PKCS #1 v1.5 with SHA-256) of the request body. Verify it with the public key for the environment the webhook comes from, against the exact request body bytes received. Do not parse and reserialize the JSON before verifying, and reject any request whose signature does not verify.

Production public key
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApt79SQOGArlR2koxlPle
FA1uwdgHeO9kF25TWHqv9mDPCSAci96I57T4/JSdcVu5g2f9SELdK66cTeB5Zrob
vGC3AS1dEA2twJ4fuj698ItY4ocrPTxG8HHp/Z3bZ1CZswI5dTvOdA45amzS+HDX
6+kgCifnvQFBVMFcwhJxjhtzKqUaDF5Lej129kyaL3NPTEIMPye6Y2UhobIvr0RI
XsmKZyPjixQ00t0UkVn3nEZ1eUiPzqYcNYi4QVMT00UnSTWMStNqaERlhjZ5ZZUX
MwNZehyu3oh3TXRF+VdHK2ZX9Hjz2zQ7+slRnPFiCvjy8vokcnfzj03QEhyc3DU0
eQIDAQAB
-----END PUBLIC KEY-----
Sandbox public key
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzb/GozCsrBraOixVyoaC
fjtIrFktm5TM9vd+S12a4W3hdX/L2WaiHXF+5/4hWMQZEKID/baSwdceNwv24pn1
ePxhYOJmXmO0ckd2O5B6/YVX+oWKGVc9TIWP94QR0kve3c8OYuUaqNby8eZ9hrwG
FRna5hlmVeDdYiPXaM2//otH6gAhY9w0snSW1ng+BRuGt5RzFZWcGvkn5335hbEh
nExyRIRTHuoijRN85jsJR401sgOmn5dU7uwgryO0nlG/IVx0VdJuCnwghbiop2Wb
sebW3qr0cadYuLbxZpAw8LO9FPpwqZjSRUO9pbNX0+EfD2Gthmgmfp0N5gRu1RwP
YwIDAQAB
-----END PUBLIC KEY-----
import crypto from "node:crypto";

// rawBody is the request body exactly as received, as a Buffer.
const isValid = crypto.verify(
  "sha256",
  rawBody,
  NELO_PUBLIC_KEY_PEM,
  Buffer.from(request.headers["x-nelo-signature"], "base64"),
);

Idempotency and retries

Use the Idempotency-Key header when creating, capturing, voiding, or refunding an order.

If a request times out, retry it with the same idempotency key and request body.

Idempotency keys are retained for 24 hours. Only successful (2xx) responses are stored, so a request that failed runs again when you retry it. Reusing a key with a different request body returns 400.

For create requests, platformPaymentId also protects against duplicate orders. For refunds, use the refund's idempotencyKey.

Errors

Errors return an HTTP status code and JSON response:

{
  "message": "Order platformPaymentId is required...",
  "status": 400
}

Common status codes:

StatusMeaning
400Invalid or missing request data.
401Missing or invalid authentication.
403Token does not have permission for the operation.
404Order not found.
409The reference already has an order with a different platformPaymentId, or another create for it is in progress.
422The order's state does not allow the operation, for example voiding a captured order.
429Too many requests. Wait and retry with the same idempotency key.
503Nelo Checkout is unavailable for the merchant.

Promotional messages

Promotional-message endpoints use the publishable token, so they can be called directly from the browser.

See Promotional messages.