Events
Webhooks
Receive XXPayUS events on your server as they happen.
Add an https:// endpoint in Developers → Webhooks and choose the events to receive. XXPayUS sends each event as a POST request with a JSON body.
Event types
| Event | Sent when |
|---|---|
| payment.created | A payment is created |
| payment.completed | A payment completes |
| payment.failed | A payment fails |
| tag_payment.completed | A Tag Payment is approved by an administrator |
| tag_payment.failed | A Tag Payment is rejected by an administrator |
| withdrawal.requested | A withdrawal is requested |
| withdrawal.approved | A withdrawal is approved |
| withdrawal.rejected | A withdrawal is rejected |
Payload
Tag Payment webhook payloads
Tag Payment events are sent to subscribed webhook endpoints. The completed event includes the approved settlement reference and platform fee. The failed event includes the rejection reason and refunded total charge. These events reflect administrator decisions, not automated external payouts.
Headers
| Header | Description |
|---|---|
| x-xxpayus-event | Event type |
| x-xxpayus-delivery | Unique delivery ID |
| x-xxpayus-signature | sha256=<HMAC-SHA256 of the raw body, hex> |
Verify the signature
Compute an HMAC-SHA256 of the raw request body with your endpoint's signing secret (whsec_…) and compare it with the header using a constant-time comparison. Reject the request if they differ.
Delivery and retries
- 1Accept HTTPS POST requests containing a JSON payload. Return any HTTP 2xx status within 10 seconds to acknowledge successful processing.
- 2Failed deliveries are retried automatically using exponential backoff: 2, 4, 8, 16, then 32 minutes between attempts, capped at 60 minutes. Delivery attempts are limited by the configured maximum.
- 3Verify the x-xxpayus-signature header using your endpoint signing secret before processing any event.
- 4Use the x-xxpayus-delivery header to deduplicate retries. Store processed payment transaction IDs to prevent duplicate fulfillment.
- 5Your webhook URL must have a working POST handler. HTTP 404, 401, 403, 429, and 5xx responses are treated as failed deliveries.
- 6Webhook retries are processed automatically approximately every minute when due. Every delivery and its latest result is visible in Developers → Webhook Logs.