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
- The shopper selects Nelo at checkout.
- Your backend creates an order.
- Redirect the shopper to the returned
redirectUrl. - The shopper completes the Nelo flow.
- Nelo redirects the shopper to your
redirectConfirmUrlorredirectCancelUrl. - Your backend verifies the order status.
- 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:
| Identifier | Purpose |
|---|---|
reference | Your internal order or business reference. It does not need to be unique. |
platformPaymentId | Identifies a specific payment attempt. Reuse it when retrying the same create request. |
orderUuid | Nelo'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:
redirectConfirmUrlwhen the Nelo flow completes.redirectCancelUrlwhen 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.
| Status | Meaning |
|---|---|
CREATED | Application started but not authorized. |
AUTHORIZED | Approved and ready to capture. |
CAPTURED | Authorization captured; a partial refund keeps this status. |
CANCELED | Order was voided, declined, or abandoned. |
REFUNDED | Your 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
idempotencyKeywhen 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
| Event | Sent when |
|---|---|
order.authorized | The shopper confirmed and the order is authorized. Its status is AUTHORIZED, or CAPTURED when shouldAutoCapture is true, since the capture happens right away. |
order.canceled | The 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"
}| Field | Description |
|---|---|
event | order.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. |
orderUuid | Nelo's order identifier. |
reference | The reference you sent when creating the order. |
platformPaymentId | The platformPaymentId you sent when creating the order. |
occurredAt | When 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 + eventand 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:
| Status | Meaning |
|---|---|
400 | Invalid or missing request data. |
401 | Missing or invalid authentication. |
403 | Token does not have permission for the operation. |
404 | Order not found. |
409 | The reference already has an order with a different platformPaymentId, or another create for it is in progress. |
422 | The order's state does not allow the operation, for example voiding a captured order. |
429 | Too many requests. Wait and retry with the same idempotency key. |
503 | Nelo 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.
Updated 23 days ago