The short answer

Handle duplicate webhooks at both the message and business-action level. Verify the sender, durably record accepted work, recognise repeated deliveries and protect the ERP operation against concurrent retries. Keep uncertain downstream results visible, reconcile missing updates and give an operator a safe recovery route.

At a glance

  • Distinguish a delivery ID from the stable identity of the authorised business action.
  • Persist accepted work and protect ERP creation against concurrent duplicate attempts.
  • Reconcile uncertain results before replaying, and preserve legitimate later actions such as split shipments.

The warehouse has two picking lists

An online order reaches the ERP and a picking list appears. A moment later, another notification arrives about the same order. The integration creates another record, and the warehouse now has two apparently valid instructions. This is an imagined distributor, not an Invade Core client incident. The practical question is what should happen when an integration receives the same news twice. We would start with the business promise: one authorised fulfilment should produce one dispatch instruction, however many delivery attempts carry the news. Before adding another automated step, agree how the system will recognise that it has already done the job.

A notification is allowed to knock twice

A webhook is a notification one system sends to another when something happens. Stripe's documentation explicitly warns that an endpoint can receive the same event more than once and recommends tracking processed event IDs. It also describes cases where separate Event objects represent duplicates. Shopify distinguishes an individual delivery identifier from an event identifier shared by deliveries arising from the same merchant action. Our practical conclusion is to read the actual provider's contract. Do not assume every platform's ID means the same thing, or that a new delivery ID necessarily authorises a new business action.[1][2]

Name the business action that must happen once

For our fictional distributor, we would define a stable reference for the intended operation, scoped to the source account, order and particular fulfilment action. A later, authorised split shipment needs its own identity; blindly suppressing everything with the same order number could discard legitimate work. AWS's idempotency guidance recommends consistent tokens, persistent operation states and concurrency controls. Idempotency means a repeated request has the same intended effect as the first. Apply that rule where the ERP record is created, with an atomic claim or uniqueness rule appropriate to its data model. Two workers checking an ordinary log at the same time should not both receive permission to create the same order.[3]

Acknowledge receipt without losing the work

Shopify requires signature verification for HTTPS deliveries and recommends queues for asynchronous processing. We would verify the request using the provider's supported method, then durably record the accepted event or job before acknowledging receipt. Record enough context to resume processing, with access and retention appropriate to the data. Keep received, processing, completed and needs attention distinguishable. An acknowledgement says the integration has accepted responsibility; it should not become the only surviving evidence of work that existed briefly in memory. A repeated delivery can return the appropriate acknowledgement while the original durable job continues, rather than starting a second worker for the same operation.[2]

Protect the next handoff too

The next handoff needs the same care. AWS's transactional-outbox guidance addresses the gap between updating a database and notifying another system by storing the intended notification in the same transaction, then sending it separately. It still calls for an idempotent consumer because duplicate messages remain possible. For our distributor, this is a design option where the integration controls that database boundary. It does not make an external ERP call part of the same transaction. Where the receiving API supports an idempotency key, reuse the operation's stable key on retries and check its documented scope and lifetime. If a timeout leaves the ERP result unknown, query by the agreed reference or send the case for reconciliation before trying another creation.[4][3]

A late message is a different problem

Duplicates are only one failure mode. Stripe does not guarantee event delivery order. Shopify also warns that webhook delivery is not guaranteed and recommends reconciliation jobs that retrieve source data. We would define which system owns the current order status and how an older notification is handled. A delayed order-created message must not quietly reverse an accepted cancellation. Fetch current state or apply a documented version rule where the source supports it; do not invent an ordering guarantee from arrival time. Reconciliation should compare the relevant source records with ERP references and route mismatches through the same protected operations, with gaps and API limits recorded.[1][5]

Make replay an operating procedure

Give the operating team a work queue that explains what remains uncertain. We would show the source reference, intended action, processing state, ERP reference if known, last attempt and next responsible person. Restrict replay to authorised operators and retain its reason. Agree how long duplicate-detection records must survive against the provider's retry and replay windows and the business's recovery needs. A replay after those records expire needs an explicit safeguard. If the downstream system offers neither a stable lookup nor an idempotent creation route, keep that limitation visible and require review of ambiguous outcomes. AI could summarise a failed job; it should not guess that the first dispatch never happened.

Test the uncomfortable middle of the transaction

Rehearse the awkward points in a suitable test environment: deliver the same event twice, deliver it to two workers together, stop processing after acceptance, and interrupt the response after the ERP has created its record. Add a late cancellation update and a genuinely separate split shipment. Ask the operator to recover using the information the product shows. Check the final ERP records and dispatch instructions, rather than counting successful HTTP responses. These are proposed acceptance checks, not reported client results. Fund the missing safeguard the rehearsal identifies. The integration earns trust when the warehouse can explain why one order produced one authorised dispatch, and what happens when the answer is still uncertain.

“The future isn't about how many people AI can replace. It's about how many decisions we can make better, how much unnecessary work we can remove, and how much more human potential we can unlock.”

Questions worth asking

Is logging the webhook event ID enough to prevent duplicate ERP orders?

It helps recognise repeated deliveries of that event. The business operation also needs protection against concurrent workers, separate events representing the same action and an unknown result after a downstream timeout. Define the operation's identity, enforce it at creation where supported, and provide reconciliation when the outcome is uncertain.

Sources and further reading

  1. Stripe — Webhooks: duplicate events and event ordering ↗
  2. Shopify — Verify webhook deliveries: signatures, delivery IDs, event IDs and asynchronous queues ↗
  3. AWS Well-Architected REL04-BP04 — Idempotency tokens, persistent states and concurrency controls ↗
  4. AWS Prescriptive Guidance — Transactional outbox: database and message consistency, idempotent consumers ↗
  5. Shopify — About webhooks: ordering limitations and reconciliation jobs ↗

See how to plan a project in the UAE.

Explore Automation & Enterprise Transformation