Delivery Expectations
Successful Delivery
A webhook is considered successfully delivered when your endpoint returns:- HTTP status code in the 2xx range (200-299)
- Response received within the timeout period (30 seconds)
Failed Delivery
A webhook delivery is considered failed when:Retry Schedule
When delivery fails, Fanfare retries with exponential backoff:
After 8 failed attempts over approximately 44 hours, the webhook delivery is marked as failed and no further retries are attempted.
Retry Headers
Retry attempts include additional headers:Handling Retries
Idempotency
Because webhooks may be delivered multiple times (due to retries or network issues), your handler must be idempotent:Database-Based Idempotency
For simpler setups, use database constraints:Responding Appropriately
Quick Acknowledgment
Always respond quickly (< 5 seconds) and process asynchronously:When to Return Errors
Monitoring Webhook Health
Dashboard Monitoring
Monitor webhook delivery in your Fanfare dashboard:- Go to Settings > Webhooks
- Select your endpoint
- View delivery history and success rates
Webhook Events
You can also receive webhooks about webhook delivery status:Disabling an Endpoint
Automatic Disabling
Endpoints are automatically disabled after consecutive failures:- 100 consecutive failures over 7 days
- Manual re-enabling required in dashboard
Manual Disabling
To stop receiving webhooks temporarily:- Dashboard: Settings > Webhooks > Disable
- API: Update endpoint status
Returning 410 Gone
If your endpoint is permanently removed, return 410 to stop retries:Recovering Missed Events
Event Replay
Request replay of events for a time window:Event Listing
List recent events for manual processing:Best Practices
1. Implement Circuit Breakers
Prevent cascade failures when your system is overloaded:2. Log Delivery Metadata
Log retry information for debugging:3. Set Up Alerts
Configure alerts for webhook failures:4. Test Retry Handling
Verify your retry handling in development:Troubleshooting
Common Issues
Debug Checklist
- Verify connectivity: Can you reach your endpoint from external networks?
- Check certificates: Is your SSL certificate valid and properly configured?
- Review logs: What status codes are you returning?
- Test manually: Can you process a test event successfully?
- Check timing: Are you responding within 30 seconds?