Webhooks
StablePay sends webhooks to notify you of events in real-time.Setup
- Configure your webhook URL in the Dashboard
- Set a webhook secret for signature verification
- Ensure your endpoint returns
200 OKquickly
Webhook Format
All webhooks follow this structure:Event Types
User Events
| Event | Trigger |
|---|---|
user.created | User created via API |
user.kyc_updated | KYC status changed |
Transaction Events
| Event | Trigger |
|---|---|
transaction.created | Transaction created |
transaction.deposit_detected | Deposit seen on blockchain |
transaction.deposit_confirmed | Required confirmations met |
transaction.payout_initiated | Bank transfer started |
transaction.payout_completed | Payout successful |
transaction.payout_failed | Payout failed |
Signature Verification
Verify webhook signatures to ensure authenticity:Retry Policy
If your endpoint doesn’t return200-299:
| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 second |
| 3 | 2 seconds |
| 4 | 4 seconds |
| 5 | 8 seconds |
Manual Retry
Retry failed webhooks via API:Best Practices
Respond quickly
Respond quickly
Return 200 immediately, then process async. We timeout after 30 seconds.
Handle duplicates
Handle duplicates
Webhooks may be delivered multiple times. Use eventId for deduplication.
Verify signatures
Verify signatures
Always verify webhook signatures in production.
Log everything
Log everything
Log webhook payloads for debugging and audit trails.
