Webhook Debugging
This guide helps you troubleshoot issues with webhook delivery and processing.How Webhooks Work
Fanfare sends HTTP POST requests to your configured endpoint when events occur:Common Issues
Webhooks Not Being Received
Symptoms: Your endpoint isn’t receiving any webhook requests. Checklist:-
Verify webhook URL is correct
- Check for typos in the URL
- Ensure the URL is publicly accessible
- HTTPS is required for production
-
Check endpoint accessibility
-
Verify webhook is enabled
- Check webhook configuration in the dashboard
- Ensure the webhook is active, not paused
-
Check firewall rules
- Fanfare sends requests from specific IP ranges
- Contact support for current IP allowlist
Signature Verification Failing
Symptoms: Webhook arrives but signature verification fails. Example Verification (Node.js):-
Using parsed body instead of raw body
-
Wrong webhook secret
- Each webhook endpoint has its own secret
- Secrets are different between test and live modes
-
Middleware modifying the request
Webhook Timeouts
Symptoms: Webhooks fail with timeout errors. Requirements:- Respond within 30 seconds
- Return 2xx status code for success
Duplicate Webhook Deliveries
Symptoms: Same webhook received multiple times. Causes:- Your endpoint returned non-2xx status
- Network issues caused retry
- Your endpoint took too long to respond
Wrong Event Types Received
Symptoms: Receiving unexpected event types. Solution: Filter events in configurationWebhook Payload Issues
Symptoms: Cannot parse or understand webhook payload. Debug logging:Testing Webhooks
Local Development
Use a tunneling service to receive webhooks locally:Manual Testing
Send test webhooks from the dashboard or use the CLI:Webhook Log Review
Check webhook delivery history in the dashboard:- Go to Settings > Webhooks
- Select your endpoint
- View Delivery Attempts
- Request payload
- Response received
- Status code
- Timing information
Webhook Event Reference
Queue Events
| Event | Description |
|---|---|
queue.consumer_entered | Consumer joined the queue |
queue.position_updated | Consumer’s position changed |
queue.access_granted | Consumer granted checkout access |
queue.access_expired | Consumer’s access window expired |
queue.consumer_left | Consumer left the queue |
Draw Events
| Event | Description |
|---|---|
draw.consumer_entered | Consumer registered for draw |
draw.completed | Draw selection completed |
draw.winner_selected | Individual winner notification |
draw.consumer_left | Consumer withdrew from draw |
Order Events
| Event | Description |
|---|---|
order.created | Order was created |
order.completed | Order was completed |
order.cancelled | Order was cancelled |
Error Recovery
Retry Policy
Fanfare retries failed webhooks with exponential backoff:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
| 6 | 8 hours |
| 7 | 24 hours |
Manual Retry
Retry failed webhooks from the dashboard:- Go to webhook delivery history
- Find the failed delivery
- Click Retry
Webhook Replay
For missed webhooks, use the replay feature:Best Practices
Always Respond Quickly
Use Idempotency Keys
Validate Signatures
Handle All Event Types
Monitor Webhook Health
- Set up alerts for failed webhooks
- Monitor response times
- Track success rates
Related Resources
- Webhooks Overview - Webhook configuration
- API Errors - Error reference
- Contact Support - Get help