Article
Test supplier webhook retries before they duplicate a business task
Use a fictional claims-document example and a crash-boundary test matrix to check duplicate delivery, durable receipt and downstream completion.
Contrata editorial team ·
A supplier sends an event saying a claims document is ready. Your system creates a review task, but the acknowledgement never reaches the supplier. When it retries, will the same document create another task?
A webhook is an automated event message sent to a receiving endpoint. Repeated delivery can be expected behaviour. The service review needs evidence that the receiving process handles it safely, including a crash between completing an action and recording its completion.
For an APRA-regulated bank, insurer or super fund, the useful output is a small acceptance record linking event delivery to the intended business effect. The example below uses fictional claims-document identifiers and creates no payments or customer communications.
Agree what one event should do
A fictional insurer receives event E17 from its document supplier for document D42. The agreed outcome is one review task, T61, linked to that document. A second delivery of E17 should not create another review task. A genuinely new document version may need a new task under the agreed business rules.
Write down the identity rules before testing. Is the identifier stable across retries? Is it unique only within a supplier account or tenant? Can two different event identifiers describe the same business change? How is a new version distinguished from a repeated notice? A timestamp alone may not answer these questions.
Stripe's webhook documentation explicitly discusses duplicate deliveries, separate event objects for the same underlying change and delivery without guaranteed event order. AWS's asynchronous Lambda guidance also warns that an event can arrive more than once, even without a function error. Those are provider-specific behaviours. Obtain the actual supplier's retry, ordering and retention rules rather than importing either provider's settings.
Separate receipt from completed work
The technical owner should be able to trace at least four states: received, durably retained, processing and completed. An HTTP success response might acknowledge retained work while processing continues. It does not by itself prove that the claims task exists.
There are two consequential failure boundaries. If the receiver marks an event complete before creating the task, a crash could leave missing work that later deliveries skip. If it creates the task and crashes before saving completion, a retry could create a second task.
Ask the technical owner how the design handles both boundaries. Possible mechanisms depend on the systems involved: a transaction, a durable work record, a downstream idempotency facility or a reconciliation step. An idempotent operation preserves the intended effect when repeated. The word “idempotent” in a supplier answer needs a demonstrated scope, identifier and retention period; it is not proof of end-to-end completion.
Use a bounded acceptance matrix
Agree the test with the supplier and internal technical owner in an authorised non-production environment. Use synthetic data, preserve normal authentication and signature validation, and prevent real customer messages or financial actions. Do not replay production events to discover the behaviour.
| Controlled condition | Expected observation for the fictional case |
|---|---|
Deliver E17 once | A retained event can be traced to task T61 and its document D42. |
Deliver E17 again after success | No additional task; the duplicate attempt remains traceable. |
| Deliver two copies concurrently | Both attempts are accounted for, with one intended task rather than a race creating two. |
| Stop processing after durable receipt but before task creation | Recovery completes the retained work or exposes an actionable exception; the event is not silently lost. |
| Stop after task creation but before the completion record | Recovery identifies the existing task or safely reconciles uncertainty before creating another. |
| Deliver an older event after a newer document version | The agreed version rule prevents an older event from silently replacing current state. |
| Retry beyond the duplicate-record retention period | Behaviour and limits are explicit; a later replay does not inherit an untested safety claim. |
The table defines proposed acceptance conditions, not observed results. Record actual identifiers, configuration, timing and evidence for each executed case. Leave untested rows open.
A completed receipt can still leave the task uncertain
Arrange the fictional test so the receiver retains E17, creates T61, then stops before saving its completion marker. Let the supplier retry E17. Ask the reviewer to locate the existing task linked to D42 and observe whether recovery links the retry to that task rather than creating another. Acceptance stays open until that behaviour is demonstrated; a second HTTP success alone leaves the task count unanswered.
Ask the integration owner: “Show both delivery attempts, the durable event record and the task count after recovery. Which identifier joins them, and what happens when its retention period expires?” Keep authentication and signature checks enabled throughout the authorised exercise.
Download the webhook retry worksheet (CSV). It contains fictional expected and unresolved results for the crash boundaries above. Replace them with observed evidence; its sample rows are not executed test results.
Keep the exception route usable
Ask where failed or exhausted deliveries appear, who receives the alert and how long the event can be recovered. The operating team needs a supported way to distinguish missing work, completed work and uncertain work before an authorised replay.
A supplier delivery log, a receiver's durable event record and the claims task record answer different questions. Keep their references connected. Use an exception owner and due date when they disagree; a green delivery dashboard cannot settle the business outcome alone.
This extends the API capacity review, which asks whether work can be admitted and processed within a window. After a real disruption, the recovery reconciliation guide helps classify uncertain items before resubmission. Here, the acceptance decision is narrower: demonstrate the retry and crash boundaries for this integration, then retain the untested limits with the result.