Webhook Deduplication
How Hookbase automatically detects and handles duplicate webhook deliveries to prevent processing the same event multiple times.
The Problem
Webhook providers often retry deliveries when they don't receive a timely response. This can result in the same event being delivered multiple times. Without deduplication, your application might:
- Process the same order twice
- Send duplicate notifications
- Double-charge customers
- Corrupt data with repeated operations
How Hookbase Handles Duplicates
Hookbase automatically deduplicates incoming webhooks using multiple strategies:
1. Provider Event IDs
Many providers include a unique event ID in their payloads. Hookbase extracts and tracks these IDs:
| Provider | Event ID Field |
|---|---|
| Stripe | id (e.g., evt_1234) |
| GitHub | X-GitHub-Delivery header |
| Shopify | X-Shopify-Webhook-Id header |
| Twilio | MessageSid |
2. Content Hashing
For providers without event IDs, Hookbase generates a hash of the payload content. Identical payloads within the deduplication window are automatically rejected.
3. Delivery ID Tracking
Even if the same event is processed, Hookbase tracks delivery attempts separately. Each destination receives the event exactly once.
Configuration
Configure deduplication in your source settings:
{
"deduplication": {
"enabled": true,
"window": 86400,
"strategy": "event_id",
"eventIdPath": "$.data.id"
}
}| Option | Description |
|---|---|
enabled | Enable/disable deduplication |
window | Deduplication window in seconds (default: 24 hours) |
strategy | event_id, content_hash, or both |
eventIdPath | JSONPath to extract event ID |
Viewing Duplicates
In the Events tab, duplicate events are marked with a badge. Click to see:
- Original event timestamp
- Number of duplicate attempts
- Which deliveries were skipped
API Response
When a duplicate is detected, Hookbase returns:
{
"status": "duplicate",
"originalEventId": "evt_abc123",
"originalTimestamp": "2024-01-15T10:30:00Z"
}The HTTP status is still 200 OK to prevent the provider from retrying.
Best Practices
- Use event IDs when available - More reliable than content hashing
- Set appropriate windows - Balance storage costs vs. protection
- Implement idempotency in your app - Defense in depth
- Monitor duplicate rates - High rates may indicate provider issues