How it works
The sandbox uses the same outbox engine as production. That means:- Same payload structure
- Same headers (
X-NTXPay-Delivery,X-NTXPay-Signature, etc.) - Same exponential retry policy
- Same HMAC signature format
delayed: scenario.
Register URL
Response (201)
secret — it is used to verify the HMAC signature. It is only displayed once.
Available events
| Event | Fired when |
|---|---|
cash_in | Disposable CLABE receives a (simulated) transfer |
cash_out | SPEI send resolves (confirmed or failed) |
refund_in | Cash-in refund is processed |
refund_out | Cash-out refund is processed |
Verify the signature
Each webhook arrives with theX-NTXPay-Signature header in the sha256=<hex> format:
Test dedupe
Each delivery has a uniquedeliveryId in the X-NTXPay-Delivery header and inside the payload. To test your dedupe:
- Make your handler return
500on the first attempt. - NTX Pay will deliver the same message again (with the same
deliveryId). - Confirm your system ignores the duplicate and responds
200on the second attempt.
Retry policy
| Attempt | Delay after previous |
|---|---|
| 1 | immediate |
| 2 | 30s |
| 3 | 2min |
| 4 | 10min |
| 5 | 1h |
| 6 | 6h |
| 7+ | given up |
2xx within 5 seconds — any 5xx, timeout, or connection error triggers a retry.
Test scenarios
Force the webhook to come back asFAILED or with delay:
Best practices
- Respond 200 before processing — queue the event in the background; five seconds is the ceiling.
- Use
deliveryIdfor dedupe — do not rely ontransaction.id(retries arrive with the sametransaction.idbut a newdeliveryIdon manual redrive). - Don’t depend on order — webhooks can arrive out of order after retries.
- Always verify the signature — even in sandbox.