Agents and automation

Webhook

A webhook is an automatic message one system sends to another over the web when an event happens, such as a payment succeeding or a form being submitted, so the receiving system can react immediately without repeatedly checking for changes.

A webhook is how one system tells another that something just happened. When a customer pays, the payment provider sends a short message to an address you choose, and your system updates the order straight away. For a business buyer webhooks are the plumbing behind most real-time automations, and how carefully they are handled decides whether events are processed once, twice or not at all.

How it works

The receiving side exposes a URL, often called an endpoint. In the sending system's settings, you register that URL and choose which events to subscribe to. When an event occurs, the sender makes an HTTP POST request to the URL with a payload, usually in JSON, describing the event: its type, a unique ID and the relevant data.

Good webhook handling includes a few standard steps. Verify the message, typically by checking a signature made with a shared secret, so that no one can fake events. Acknowledge quickly with a success response, then do slow work in the background, because senders time out and retry. Deduplicate using the event ID, since most providers deliver at least once and may resend. See idempotency.

A typical example: an online shop uses Stripe for payments. Stripe sends a webhook when a payment succeeds; the shop's handler verifies the signature, marks the order paid, triggers fulfilment and sends a receipt. Automation platforms such as Zapier, Make and n8n provide ready-made webhook triggers that do the receiving for you.

What it means for cost

Webhooks are cheap to run, but robust handling takes careful work:

  • Security. Signature checks and secret management are essential, especially for payment and account events.
  • Reliability. Queues, retries and a dead-letter store for failed events prevent silent data loss.
  • Ordering. Events can arrive out of order, so the handler must cope with an "updated" event that lands before "created".
  • Monitoring. Alerts when deliveries fail let someone fix problems before customers notice.

Ask a builder how they verify webhooks, what happens if the receiving system is down, and how duplicate events are prevented from causing duplicate actions.

Common questions

What is the difference between a webhook and an API?

With an API, your system asks another system for data when it wants it. With a webhook, the other system tells yours when something changes. Most integrations use both: webhooks to learn about events, and API calls to fetch full details or take action.

What happens if my system is offline when a webhook is sent?

Most providers retry failed deliveries several times over a period, but they eventually give up. A reliable build logs every event it receives, and has a way to fetch missed events through the provider's API after an outage.

Related terms

Pricing a build that involves Webhook? Send the brief and get a fixed price set next to the market range.Get a quote