API Reference
Webhook testing
Preview and send sample payment webhooks to your callbackUrl.
When you configure a custodian callbackUrl, Argonpay sends HTTP POST requests with Content-Type: application/json on payment lifecycle events.
When webhooks fire
| Event | status in body |
|---|---|
| Payment completed | completed |
| Payment expired | expired |
| Payment cancelled | cancelled |
Request format
POST /your/webhook/path HTTP/1.1Content-Type: application/jsonBody fields
| Field | Type | Description |
|---|---|---|
txnid | string | Payment identifier |
status | string | completed, expired, or cancelled |
amount | number | Requested payment amount |
amountInToken | number | Token-denominated amount |
network | string | Chain identifier (e.g. polygon, bep20) |
createdAt | string | Transaction creation timestamp |
secret | string | Custodian secret (when configured) |
privateKey | string | Same value as secret (legacy field name) |
Verify on your server
- Accept POST JSON only.
- Match
txnidagainst your order records. - Validate
secret/privateKeyagainst the secret you set on the custodian. - Treat
completedas paid,expired/cancelledas terminal non-success states.
Use the webhook tester below to preview the JSON body and send a test POST to your endpoint.
Webhook preview
Test your webhook
Argonpay POSTs JSON to your custodian callbackUrl when a payment completes, expires, or is cancelled. Adjust the fields below to see the exact body shape, then optionally send a test request to your endpoint.
