Webhook Setup
Webhooks notify your server instantly when payments are confirmed on the blockchain.
Setup Steps
- Login to RazCrypto Dashboard
- Go to Platforms → Select your platform
- Enter your Webhook URL (must be HTTPS)
- Save — copy the Webhook Secret shown
- Add secret to your server environment:
RAZ_WEBHOOK_SECRET=xxx
HTTPS Required: Your webhook URL must use HTTPS. HTTP endpoints will not receive webhooks.
Webhook Events
| Event | Description | Status |
|---|---|---|
payment.completed | Payment confirmed on blockchain | ✅ Live |
payment.failed | Payment failed or expired | 🔜 Coming soon |
payment.pending | Payment created, not confirmed | 🔜 Coming soon |
Webhook Payload
JSON
{
"event": "payment.completed",
"timestamp_iso": "2025-10-05T17:59:01+00:00",
"status": "success",
"amount": 0.20000448,
"tx_hash": "0x4f3b0eedaad8ff3cf9d14b460ee98593...",
"gateway_id": "UID48440548",
"payment_id": "payid_8b49b25fcf27bfd7",
"invoice_url": "https://razcryptogateway.com/invoice/payid_8b49b25fcf27bfd7",
"mobile_number": "9876543210",
"email_id": "[email protected]",
"custom_data": {
"order_id": "ORD_2024_001",
"user_id": "USER_123"
}
}
Retry Logic
If your endpoint returns non-2xx, RazCrypto retries up to 3 times with exponential backoff. Always return 200 OK after processing.