Context
An ecommerce integration connects an order event to fulfillment or an internal accounting workflow. The difficult part is often what happens after the first successful delivery: a retry, a worker restart or a downstream system that is temporarily unavailable.
Establish trust at the receiving boundary
Shopify's HTTPS delivery guidance documents HMAC verification using the raw body and the app's client secret. It also describes delivery identifiers for duplicate detection. Keep that verification boundary ahead of code that changes business records.
Avoid logging the complete payload by default. Order events can contain customer information that is unnecessary for routine operational diagnosis. Retain an appropriate delivery reference and a limited processing status instead.
Separate acceptance from business completion
Design a durable intake record or another suitable handoff before acknowledging work as accepted. Then make the processing state visible: received, processing, completed or failed with a reason that an operator can investigate. The exact handoff should match the application's scale and recovery requirements.
Do not treat an HTTP success response as evidence that accounting or fulfillment has completed. Give the operating team a way to distinguish successful intake from successful downstream work.
Plan duplicates and business replay
Use persistent identifiers to recognize deliveries already processed, and make the downstream business operation repeat-safe where practical. Document the difference between replaying a delivery and deliberately creating a new business operation. They should not accidentally produce the same effect twice.
Prepare a recovery exercise: stop the worker after intake, restart it, replay an accepted delivery and inspect the destination record. Then make the downstream service fail temporarily and verify that retries do not create uncontrolled duplicate work.
Reconcile the important state
A webhook pipeline needs a way to investigate missing or conflicting business outcomes. Choose a reconciliation process appropriate to the integration and its available APIs. Record which system is authoritative for order, payment and fulfillment fields; they need not all have the same owner.
A handover should identify the alert owner, replay permissions and a safe procedure for correcting a failed integration record.
Explore Shopify engineering and ecommerce integrations.
Technical reference
Shopify: verify webhook deliveries. Confirm event and delivery identifier behavior for the integration being implemented.