# 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.

Also called: webhooks, HTTP callback, web callback, reverse API, event notification. Category: Agents and automation. Source: https://aibuildindex.com/glossary/webhook

## In the index

- Webhooks: median $1,500, middle half $400 to $6,160, 427 priced briefs (https://aibuildindex.com/skills/webhooks)
- Stripe: median $2,500, middle half $660 to $6,000, 545 priced briefs (https://aibuildindex.com/tools/stripe)

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](https://aibuildindex.com/glossary/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](https://aibuildindex.com/glossary/trigger) 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](https://aibuildindex.com/glossary/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

- [Trigger](https://aibuildindex.com/glossary/trigger): A trigger is the event that starts an automated workflow or AI agent, such as a new email, a form submission, a database change, an incoming webhook or a scheduled time.
- [API](https://aibuildindex.com/glossary/api): An API, or application programming interface, is a defined way for one piece of software to request data or actions from another, such as fetching a customer record, sending a message or calling an AI model, without a person using a screen.
- [Event-driven architecture](https://aibuildindex.com/glossary/event-driven-architecture): Event-driven architecture is a way of designing software in which components react to events, such as a new order or a signed contract, as they happen, rather than checking for changes on a timetable or calling each other directly.
- [Idempotency](https://aibuildindex.com/glossary/idempotency): Idempotency is the property of an operation that produces the same result whether it runs once or several times, so a retried or duplicated request does not create a second invoice, email or record.
- [Workflow automation](https://aibuildindex.com/glossary/workflow-automation): Workflow automation is the use of software to carry out a repeatable business process, moving data between systems and taking actions based on triggers and rules, so that people no longer do those steps by hand.
- [REST API](https://aibuildindex.com/glossary/rest-api): A REST API is a web API that follows the REST style, exposing data as resources at URLs and using standard HTTP methods such as GET, POST, PUT and DELETE to read and change them, usually exchanging data as JSON.
