Skip to main content

How it works

The sandbox uses the same delivery engine as production:
  • Same payload structure — see the full contract
  • Same headers (x-event-id, X-NTXPay-Signature)
  • Same retry policy (5 attempts, exponential backoff, 10s timeout)
  • Same HMAC signature format
The difference is the origin: instead of waiting for real settlement on the SPEI network, the simulator resolves the transaction in seconds — and you control the outcome via scenarios. Webhook configuration is identical to production — register your URL via POST /api/webhooks-config as usual.

Two ways to trigger a webhook

1. Test webhook (no transaction)

The fastest way to validate your endpoint — it fires a signed delivery without moving anything:
The response tells you immediately whether your endpoint returned 2xx, the response time, and the signature that was sent. Vary the status (LIQUIDATED, PENDING, REJECTED, RETURNED) to exercise each path in your handler. Field details in Setup.

2. Simulated transaction (full flow)

Create a cash-in or cash-out with the X-Sandbox-Scenario header — the entire pipeline runs (balance, fee, statement) and the webhook arrives in seconds with the outcome you chose: See the full scenario catalog.

Testing dedupe

Each delivery carries a unique x-event-id. To test your dedupe:
  1. Configure your handler to return 500 on the first attempt.
  2. NTX Pay will deliver the same message again (with the same x-event-id).
  3. Confirm that your system ignores the duplicate and responds 200 on the second attempt.

Testing the signature

Point a test webhook at your endpoint and validate the X-NTXPay-Signature with the secret returned at creation:
Complete handlers in Node.js, Python, Java, and Go: Implementation.

Best practices

  1. Validate the signature — always, even in the sandbox.
  2. Use x-event-id for dedupe — the same event may be redelivered.
  3. Do not rely on ordering — webhooks may arrive out of order after retries.
  4. Exercise all four statuses before going to production — that is what the sandbox is for.