Overview
Webhook configuration is done via four endpoints:GET /api/webhooks-config— list active webhooksPOST /api/webhooks-config— create/configure a webhookPOST /api/webhooks-config/test— trigger a signed test webhookDELETE /api/webhooks-config/{id}— delete a webhook
Create Webhook
Request
Response (201)
Fields
A webhook subscribes to exactly ONE event — the array must contain a single item. Accepted values:
cash_in, cash_out, refund_in, refund_out, all (General — receives all events), and internal_transfer. See the semantics of each type in the Overview.HMAC secret for signature validation. Minimum 8 characters, maximum 128. If omitted, NTX Pay generates one.
Test Webhook
After creating the webhook, trigger a test delivery signed with the same secret — no need to move a transaction:Which webhook receives the test:
cash_in, cash_out, refund_in, refund_out, or internal_transfer.delivered: true means your endpoint responded 2xx. statusCode: 0 indicates a connection error.
List Webhooks
The list response does not include the
secret — it is only shown at creation time.Delete Webhook
Multiple Webhooks
Each webhook subscribes to exactly one event, so you have two strategies:- One webhook per type (e.g. one for
cash_in, another forcash_out) — routes each type to its own endpoint/handler. - One
allwebhook — a single URL receives everything and your handler routes by the payload’seventfield.
Validating the Endpoint
Before releasing the webhook to receive real traffic:- Use webhook.site or ngrok to inspect the traffic (the test webhook’s
overrideUrlfield accepts these URLs) - Trigger deliveries with
POST /api/webhooks-config/test, varying thestatus - Verify that your application:
- Validates
X-NTXPay-Signaturecorrectly - Returns
200in under 10 seconds - Deduplicates by
x-event-id
- Validates
Next Steps
Implementation
HMAC validation in Node.js, Python, Java, and Go
Events
Payload for each event type