Create Webhook
POST/webhooks
Register an HTTPS webhook endpoint to receive event notifications. The response returns the created destination and its signing_secret.
The signing secret is shown exactly once — store it now; it cannot be retrieved later. Use it to verify the signature of incoming webhook deliveries.
A webhook created here has order.status_changed enabled; the other events follow the per-event defaults listed in Webhook events.
Requirements:
- Your account needs more than 1 TRX of net confirmed deposits (confirmed deposits minus withdrawals, including their fees). Purchases don't reduce it; withdrawals do.
- The URL must use HTTPS and its host must resolve only to public IP addresses (
localhost,*.localandtronagg.aihosts are rejected). The host is checked again before every delivery. - Redirects are not followed. A trailing
/is removed from the URL. - One webhook per URL, at most 10 webhooks per account.
Request
Responses
- 201
- 400
- 422
Webhook created. The signing_secret is returned only here.
The webhook could not be created. detail.error is one of:
validation_error— the URL does not use HTTPS, has no host, is atronagg.aihost, its host could not be resolved or does not resolve only to public IP addresses; the URL is already connected to your account; or your account already has 10 webhooks.detail.messageexplains which.webhook_deposit_required— your account does not yet have more than 1 TRX of net confirmed deposits. The body also carriestotal_deposited_sun(your current net confirmed deposits in SUN: confirmed deposits minus withdrawals, including their fees, floored at 0) andrequired_total_deposited_sun(1000001). Both are integers.
Validation Error