October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk7 min

What Is a Webhook? How Webhooks Work and Six Ways They Break in Production

A webhook sends an HTTP request when a subscribed event occurs. Learn the receiver lifecycle, provider-specific delivery rules, and six failure modes to plan for.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A webhook is an HTTP event notification sent by one service to an endpoint you configure. When a subscribed event occurs, the service sends a request; your application verifies and acknowledges it, then processes the event. The pattern is straightforward, but delivery timing, retries, signatures, and ordering vary by provider—details that matter when a webhook is part of a production system.

How a webhook works

A webhook reverses the usual polling pattern. Instead of your application repeatedly asking a service whether anything changed, the service sends a request when an event occurs. For example, an online store can notify an order-processing application when an order is created.

As an Amazon Associate I earn from qualifying purchases.

For HTTPS deliveries, Shopify documents a common form: an HTTP POST with a JSON body and metadata in headers. Other providers may use different payload formats, headers, transports, delivery identifiers, and retry policies. A webhook is a common integration pattern, not one universal protocol.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Configure a destination and subscription. The receiving application provides an endpoint, and the sending service is configured to deliver selected event types there.
  2. The event occurs. The sender constructs a delivery containing the event data and, depending on the provider, identifiers, version information, and a signature.
  3. Your endpoint receives and verifies it. Preserve the request body in the form required for signature verification, check the signature, and validate the event type and action before trusting the data.
  4. Persist or enqueue the event. Record it durably so a process crash after the HTTP response does not silently lose accepted work.
  5. Acknowledge promptly, then process safely. Respond within the provider’s documented time limit and handle the event with duplicate and ordering safeguards.

Keep the provider’s delivery documentation close to the implementation. Do not infer a retry schedule, delivery guarantee, or ordering rule from another service’s behavior.

Why webhooks break in production

These are six common failure classes, not a promise that every provider retries, orders, or reports deliveries in the same way.

1. The endpoint cannot be reached

DNS errors, network routes, firewall rules, a stopped listener, or incorrect host configuration can prevent a sender from connecting. GitHub’s troubleshooting guidance distinguishes connection errors and recommends checking network access and current GitHub IP information. If you use IP allowlists, treat them as operational data that may need updating rather than as a set-and-forget configuration. See GitHub’s webhook troubleshooting guide.

2. The receiver takes too long

A handler that performs lengthy business logic before responding can exceed the sender’s deadline. GitHub recommends a 2XX response within 10 seconds; it terminates slower deliveries and marks them failed. Queue the work asynchronously so the request handler can verify and durably accept the event, then respond promptly. The queue must itself be durable: acknowledging before saving the event can lose it if the application crashes. See GitHub’s webhook best practices.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. The response is rejected

A non-2XX status or an invalid HTTP response may be treated as a failed delivery. Log the status and consult the sender’s delivery record to distinguish an application rejection from a connectivity problem. Return success only after the event has been safely accepted or persisted—not merely because the request reached your handler.

4. Signature verification fails

Common causes include using the wrong secret, checking the wrong header or algorithm, or allowing middleware to alter the request body before verification. Shopify calculates its HTTPS HMAC from the raw request body; parsing JSON and serializing it again can change the bytes and invalidate the check. GitHub recommends the X-Hub-Signature-256 header with HMAC-SHA256. Verify using the provider’s documented input and method before acting on the payload. See Shopify’s verification guide and GitHub’s best practices.

5. A delivery is repeated

Retries and ambiguous network failures can result in the same event being handled more than once. Shopify explicitly notes that duplicate deliveries can occur and provides delivery identifiers. Record an appropriate provider event or delivery ID, and make consequential business actions idempotent so repeating a delivery does not repeat a charge, shipment, or other side effect.

An Idempotency-Key is one possible pattern only when the receiving server supports and documents it. MDN labels the header experimental and non-standard; do not assume a webhook sender or receiver implements it. See MDN’s Idempotency-Key reference.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Shelly Pro 3EM 3CT 63 Wi-Fi & LAN 3-Phase Smart Energy Meter
  • The Shelly Pro 3EM 3CT 63 is a next-gen DIN rail-mountable energy meter for single or three-phase installations, featuring a 63A, 3-phase current transformer for non-contact measurements. It supports 4-quadrant measurement, optical pulse indication of energy usage, and is photovoltaic-ready. *It doesn't have a built-in relay; contactor control requires a Shelly Pro Addon attached to the device.
  • Professional Smart Meter - Shelly Pro 3EM-3CT63 is a professional smart meter that reports accumulated energy, voltage, current, active, and apparent power per phase in real time. It stores data for up to 60 days in 1-minute intervals and includes a real-time clock to maintain accurate time if the SNTP server connection is lost.
  • Ideal for business energy measurement - In commercial buildings, it helps monitor energy usage across floors or departments allowing accurate cost allocation and identification of energy wastage. In manufacturing plants it tracks energy consumption of heavy machinery, optimizing usage to reduce operational costs. For store owners it monitors energy usage of systems like lighting, HVAC § refrigeration, helping to identify inefficiencies § reduce energy bills while supporting sustainable practices
  • Shelly Customer Service - Shelly is one of the fastest-growing Smart Home brands in the world with devices, providing solutions for the automation of private homes, buildings and businesses. We provide our customers with professional support and a 5 years device warranty.
  • Shelly Smart Control App will help you control your Shelly devices remotely and will send notifications for all automated events in your home. You can easily configure devices and manage their settings individually, or you can create personalized scenes by combining Shelly devices to trigger certain actions in your home automation.

6. Events arrive late or out of order

GitHub notes that deliveries may arrive in a different order from the events and can take minutes to appear. If each notification overwrites state blindly, an older event can undo a newer one. Use provider timestamps and identifiers where available, avoid applying stale state, and reconcile with the provider’s authoritative API when correct ordering matters. See GitHub’s troubleshooting guide.

Build a receiver that is secure and recoverable

Protect the endpoint and secret

  • Use HTTPS and keep certificate verification enabled.
  • Store a high-entropy signing secret securely; do not put credentials in the payload URL.
  • Verify the signature over exactly the input required by the provider. For Shopify HTTPS deliveries, that means the raw body and the app client secret.
  • Do not trust a payload or perform its requested action until signature verification succeeds.

Accept only events your application understands

  • Subscribe only to event types the application needs.
  • Check both event type and action before acting. Providers can add event types and actions over time.
  • Handle unknown events safely—for example, record the delivery and decline to run business logic—rather than assuming every payload matches an older schema.

Acknowledge only after durable acceptance

Keep the HTTP request path short: verify, validate, persist or enqueue, and respond. Move slow work into a recoverable background process. A fast response without durable acceptance is not reliability; it can make a lost event harder to detect because the sender believes delivery succeeded.

Make retries safe and observable

Track event and delivery identifiers, timestamps, event type, signature result, response status, and processing state. Avoid logging secrets or unnecessary sensitive payload data. Use provider IDs where they identify repeats, and add application-level idempotency for consequential side effects. A generic HTTP idempotency header is not a substitute for a documented contract between sender and receiver.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Compare the provider’s actual delivery contract

Before integrating a webhook, check the relevant provider documentation for each of these behaviors. Shopify and GitHub illustrate why one provider’s rules should not be generalized to another.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Behavior to check GitHub Shopify
Transport and payload Consult GitHub’s webhook documentation for the configured event and delivery details. HTTPS deliveries use POST with a JSON body and metadata headers. Shopify also documents Amazon EventBridge and Google Cloud Pub/Sub delivery; these managed transports carry metadata differently.
Signature verification GitHub recommends X-Hub-Signature-256 with HMAC-SHA256. For HTTPS deliveries, verify the HMAC using the raw request body and the app client secret. Shopify says HMAC verification applies to HTTPS; managed transports handle delivery metadata differently.
Acknowledgement timing GitHub recommends a 2XX response within 10 seconds; slower deliveries are terminated and marked failed. Follow Shopify’s current delivery and troubleshooting documentation for the applicable endpoint and transport.
Retry behavior Check GitHub’s current delivery record and documentation; the cited guidance does not establish a retry schedule comparable to Shopify’s stated schedule. If Shopify receives no response or an error, its documentation says it retries eight times over the next four hours and stops after eight failed attempts.
Identifiers and versions X-GitHub-Delivery helps identify a delivery; GitHub says a redelivery uses the same value as the original. Documented headers include X-Shopify-Webhook-Id, X-Shopify-Event-Id, and X-Shopify-API-Version.
Ordering and recovery GitHub says deliveries can arrive out of order or take minutes to appear, and recommends redelivering missed deliveries. Consult Shopify’s current troubleshooting guidance for recovery. After extended downtime, it advises recovering missing data by re-subscribing where applicable and importing missing data.

Provider behavior can change. For Shopify, use the delivery structure, verification, troubleshooting, and current Webhooks API reference for the relevant configuration. The documented Shopify retry count and window are Shopify-specific, not an industry standard.

Investigate a failed delivery

  1. Find the sender’s delivery record. Determine whether it attempted the request, what response it observed, and whether the issue is connection, timeout, response status, or verification.
  2. Check reachability. Confirm DNS, firewall and allowlist rules, TLS configuration, host availability, and that the expected route is listening.
  3. Compare elapsed time and response. Inspect application and proxy logs for handler duration, status code, and malformed responses. For GitHub, compare the delivery with its 10-second response recommendation.
  4. Check signature inputs. Confirm the secret, header, algorithm, and exact request bytes match the provider’s instructions. Ensure middleware has not parsed and changed the body first.
  5. Trace persistence and processing separately. Establish whether the event was durably accepted, queued, and processed; a successful HTTP response does not prove downstream work completed.
  6. Look for duplicate or stale events. Compare event and delivery identifiers and timestamps before replaying or applying a change.
  7. Recover deliberately. Use the provider’s redelivery or import procedure, and ensure replaying the event cannot repeat business side effects.

For HTTP responses such as 429 or 503, Retry-After can communicate how long a user agent should wait before another request. It is a response mechanism, not a guarantee that a webhook sender will honor the delay; check the sender’s documentation. See MDN’s Retry-After reference.

Plan for recovery, not just successful delivery

Webhooks are useful for timely event notifications, but a robust integration should not depend on a notification being the only way to discover a change. Keep enough identifiers and processing state to investigate failures, make redelivery safe, and reconcile with an authoritative API or import process when events were missed. GitHub recommends redelivery of missed deliveries; Shopify’s troubleshooting guidance describes recovering missing data after extended downtime by re-subscribing where applicable and importing data.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.