Connecting two systems usually comes down to one question: how does system B find out that something happened in system A? It can keep asking every few minutes, which is slow and wasteful, or system A can tell it straight away. A webhook is the second option. When an order is placed, a form is submitted or a payment clears, the source system sends a small HTTP message to a URL the receiver registered in advance. Webhooks power most real-time e-commerce integrations, and knowing how they fail matters as much as knowing how they work. Below: what a webhook is, how it works and how to receive one safely.
What is webhook
A webhook is an automated HTTP request that one system sends to a URL in another system the moment an event happens, such as a new order or a payment.
- Direction: a one-way push from the sending system to the receiving URL.
- Format: the event data is usually sent as JSON.
- The difference from polling: the receiver does not have to keep asking whether anything has changed.
How a webhook works
- Registration. The receiver gives the sender a URL and chooses which events it wants, for example "order created".
- Event. Something happens in the sending system.
- Delivery. The sender makes an HTTP
POSTto the URL, with the event data in the body and metadata such as the event type and a signature in the headers. - Acknowledgement. The receiver checks the request, stores or processes it, and answers with a 2xx status code. Anything else, or no answer, counts as a failure, and many senders retry.
Example: an order payload
A hypothetical order payload might look like this:
{
"event": "order.created",
"order_id": "1042",
"total": 249.9,
"currency": "ILS",
"customer": { "name": "Dana Levi", "phone": "050-0000000" }
}
Webhook vs polling
- Polling: the receiver calls the other system's API on a schedule and asks for anything new. It is simple and self-correcting, but always late by up to one interval, and most calls return nothing.
- Webhooks: arrive within seconds and cost nothing when nothing happens.
- In practice: the two are combined. Webhooks for speed, plus an occasional API sync to catch anything a webhook missed.
Receiving webhooks safely
- Verify the sender. Platforms sign each delivery with a shared secret. WooCommerce sends an
X-WC-Webhook-Signatureheader and Shopify sendsX-Shopify-Hmac-Sha256, and the receiver recomputes the signature and rejects mismatches. Where there is no signature, a long secret token in the URL serves as the credential. - Handle duplicates. Retries mean the same event can arrive twice. Deduplicate on an event or order ID so one order never becomes two.
- Answer quickly. Slow processing leads to timeouts, which trigger retries, which create more load.
- Log every delivery. When two systems disagree, the delivery log is the first place to look.
Webhooks for an online store
Almost every "real-time" feature in e-commerce, from a new-order alert to a lead appearing in a CRM, starts with a webhook.
- When they work: data flows without anyone exporting spreadsheets.
- When they silently fail: orders go missing from reports, and customers wait for replies nobody knows they need.
Common mistakes
- Accepting deliveries without checking the signature or token.
- Assuming every delivery arrives exactly once and in order.
- Doing heavy work before responding, so the sender times out.
- Sharing a tokenised webhook URL in screenshots or support tickets. Anyone with the URL can post to it.
- Never reconciling, so a missed delivery is only noticed weeks later.
Webhooks in StoreChart
StoreChart receives webhooks:
- Connected stores: connecting a WooCommerce or Shopify store registers an order-created webhook on that store, and each delivery's platform signature is verified before the order is saved.
- Duplicates: a repeat delivery of an order that already exists is detected instead of creating a duplicate.
- Other sources: StoreChart issues token-protected inbound webhook URLs for orders, leads and sales-channel orders. That is how tools such as Make push data in.
- Logging: received deliveries are logged, and store and order-webhook deliveries can be reviewed in the integration logs.
- Not included: StoreChart does not send webhooks to other systems.
Frequently asked questions
What is the main downside of webhooks vs polling?
The receiving side must be always available to accept the incoming request, and building a correct implementation (signature verification, idempotent handling of retries) takes more upfront engineering than a simple scheduled polling script.
What happens if a webhook delivery fails?
A well-built sender retries the delivery a limited number of times with increasing delay between attempts and records the failure if every retry fails, rather than silently dropping the event. Retry behaviour differs between platforms, so the receiver should not assume any particular policy.
Can a webhook be used for two-way communication?
Not directly: a webhook is a one-way push from the sending system to the receiving URL. Two-way communication typically pairs a webhook (for real-time push) with a regular API call (for the receiving system to request additional data back).
