Webhook Overview
Webhooks allow your application to receive real-time notifications about events in your Hixbe account, eliminating the need for constant polling.How Webhooks Work
- Event Occurs: Something happens in your Hixbe account (payment succeeds, SMS delivers, credential issues)
- Notification Sent: Hixbe sends an HTTP POST request to your configured webhook URL
- Your App Responds: Your application processes the event and responds with a 200 status code
- Confirmation: Hixbe marks the webhook as successfully delivered
Setting Up Webhooks
Payment Gateway Webhooks
Register webhook in dashboard
- Go to dash.hixbe.com
- Navigate to Webhooks section
- Click “Create Webhook”
- Enter your endpoint URL
- Select event types to listen for
SMS Gateway Webhooks
Certification Webhooks
Webhook Events
Payment Events
| Event | Description | Payload |
|---|---|---|
payment_intent.succeeded | Payment completed successfully | PaymentIntent object |
payment_intent.payment_failed | Payment failed | PaymentIntent with failure reason |
payment_intent.canceled | Payment was canceled | PaymentIntent object |
refund.succeeded | Refund processed successfully | Refund object |
customer.created | New customer created | Customer object |
SMS Events
| Event | Description | Payload |
|---|---|---|
message.sent | SMS message sent | Message object with ID |
message.delivered | SMS delivered to recipient | Delivery confirmation |
message.failed | SMS delivery failed | Failure reason and details |
balance.low | SMS balance running low | Current balance info |
Certification Events
| Event | Description | Payload |
|---|---|---|
credential.issued | New credential issued | Credential details |
credential.verified | Credential verification completed | Verification result |
credential.revoked | Credential revoked | Revocation details |
badge.earned | Badge earned by recipient | Badge information |
Webhook Security
Verify Webhook Signatures
Security Best Practices
- Always use HTTPS for webhook endpoints
- Verify webhook signatures on all requests
- Use secret keys unique to each webhook
- Implement idempotency to handle duplicate events
- Validate event data before processing
- Monitor webhook delivery in your dashboard
Webhook Payload Format
All webhook payloads follow a consistent structure:Handling Webhook Failures
Retry Logic
Hixbe automatically retries failed webhook deliveries:- Immediate retry: After 1 minute
- Exponential backoff: 2, 4, 8, 16 minutes
- Final attempt: After 24 hours
- Expiration: Events expire after 7 days
Failure Response Codes
| Status Code | Action |
|---|---|
200-299 | Success - no retry |
300-399 | Success - no retry |
400-499 | Failure - no retry (client error) |
500-599 | Failure - retry with backoff |
Manual Retry
Failed webhooks can be manually retried from your dashboard.Testing Webhooks
Use RequestBin for Testing
For initial testing, use services like RequestBin or ngrok:Test Events
Use the dashboard to send test events to your webhook endpoint.Monitoring and Debugging
Webhook Logs
Access webhook delivery logs in your dashboard:- Delivery status (success/failure)
- Response time and status codes
- Request/response payloads
- Failure reasons
Common Issues
Webhook not receiving events
Webhook not receiving events
- Check endpoint URL is correct and accessible
- Ensure HTTPS is used (HTTP not supported)
- Verify firewall allows incoming connections
Invalid signature errors
Invalid signature errors
- Confirm webhook secret is correct
- Check signature verification implementation
- Ensure raw request body is used for signature calculation
Duplicate events
Duplicate events
- Implement idempotency using event IDs
- Store processed event IDs in your database
- Return success quickly to prevent retries
Best Practices
- Process webhooks asynchronously to avoid timeouts
- Implement idempotency using event IDs
- Store webhook events for debugging
- Monitor webhook health in your dashboard
- Use different endpoints for different event types
- Test thoroughly in sandbox before production
Need Help?
Troubleshooting
Common webhook issues and solutions
Error Handling
Handle webhook errors gracefully
Best Practices
Webhook security and reliability
API Reference
Complete webhook API documentation