Delivery and Reliability
Handling Duplicate Webhook Events
Duplicate webhook deliveries are not an error. They are a normal part of how providers ensure reliable event delivery.
When webhook delivery fails or times out, providers retry the same event.
This means your endpoint may receive the same payload multiple times.
Why duplicate events happen
- slow webhook response time
- temporary network errors
- server returning 5xx responses
- provider retry policies
Real production problems duplicates cause
- double subscription activation
- duplicate invoices
- duplicate provisioning
- duplicate emails
Using event IDs to detect duplicates
Most webhook payloads include a unique event identifier.
if (Event::where('event_id', $id)->exists()) {
return response()->json(['duplicate']);
}
Designing idempotent handlers
Idempotent systems produce the same result even if the same event is processed multiple times.
For a deeper implementation strategy see our guide on idempotent webhook handling in Laravel.