Webhook delivery handling

Deliver the same webhook while the first worker is still running

Concurrent duplicates expose gaps that sequential retries miss. Verify receipt deduplication and the actual business effect independently.

In this article

Create a verified synthetic delivery

Use the provider's safe test mechanism or an isolated signing setup appropriate to the integration. Choose an event with a clearly observable test effect.

Preserve the provider event identity and expected account scope. A second event about the same resource is not necessarily a duplicate delivery, so use the exact case the test intends.

Arrange a worker pause before the effect is committed.

Send overlapping copies

Deliver the same verified event twice while the first attempt remains active. Confirm that receipt storage uses its atomic uniqueness or equivalent protection.

Inspect worker claims and effect records. Two receiver responses can both be successful while only one processing operation should own the intended effect.

Do not rely on a process-local set if production has multiple instances. Run the test across the actual shared-state boundary.

Crash after the effect

In another run, allow the effect to complete and interrupt the worker before it records final completion. Resume processing and verify that the effect is not repeated.

For an external test service, inspect its operation records independently. A local processed marker cannot prove what happened remotely when the response was lost.

Keep the event in a visible uncertain state if the design requires reconciliation rather than forcing another action.

Test age and ordering separately

Replay an older valid event according to the provider's permitted verification and redelivery mechanism. Confirm that the application applies its documented ordering policy.

Then send a distinct newer event for the same resource and verify it is not discarded by overly broad deduplication.

The exercise passes when overlapping deliveries, interrupted effects and distinct resource changes all reach the intended outcomes. Counting one inbox row is useful evidence, but the final business result is the stronger assertion.

Primary sources

Stripe: webhook handling

References checked 11 September 2026.