What Are Webhooks
How websites send each other automatic messages without you doing anything.
The One-Line Explainer
A webhook is just a way for one app to automatically tell another app something happened — the moment it happens, without anyone checking.
Think of it like a text message between two apps. App A says "hey, this thing just happened" and App B gets the news right away.
Here's a simple example: you fill out a form on a website. The website uses a webhook to immediately tell your email tool "someone signed up!" — and your email tool sends a thank-you note, instantly.
The word "webhook" sounds complicated, but the idea is simple. The "hook" part means something is waiting to be triggered. The "web" part means it works over the internet. When the right moment comes, the hook fires.
No More Hitting Refresh
Before webhooks, apps had to check in with each other constantly — like standing by a mailbox and asking "any news yet? any news yet?" every few minutes. This is called "polling" and it wastes a lot of time and energy.
Webhooks flip that around. Instead of checking, an app just waits. When something happens — a payment, a form submission, a new user — the app that knows about it sends the news right over. No waiting, no wasted checks.
This makes everything faster and simpler. Here are real things webhooks make happen:
💡 Key Insight
Webhooks are why your favorite tools feel "smart" — things happen the moment they should, without a person standing around watching for them. The automation you love in your apps? Webhooks are usually doing the work behind the scenes.
The Four-Step Flow
Here's what actually happens when a webhook does its job:
Something happens in App A
A user takes an action — submits a form, makes a payment, uploads a file. This is the "event" that triggers everything.
App A sends an HTTP request
App A puts the news into a数据包 (data package) and sends it to a web address (URL) that App B gave it beforehand. This is the webhook — just a web address that listens for these messages.
App B receives the message
App B's webhook URL gets the message, reads it, and knows something happened. It might include details — like who signed up, what they bought, how much they paid.
App B does its job
App B takes action — sends an email, updates a record, posts a message in Slack, adds a row to a spreadsheet. The whole chain of events took only seconds.
A Webhook in the Real World
Imagine you run a small online store. You want to know the moment someone buys something so you can ship their order fast. Here's how webhooks make that happen:
Step 1: Your store's payment tool (let's call it Stripe) is set up to send a webhook every time a sale happens.
Step 2: A customer buys something on your website. Stripe detects the payment. Stripe immediately sends a webhook to your phone notification tool (like a little script you set up).
Step 3: The notification tool receives the webhook, reads the order details, and sends you a text: "New order! Item: Blue T-Shirt, $25. Customer: Jane D."
Step 4: You see the text and ship the order. The whole thing — from purchase to your notification — took about 5 seconds.
Here's what the webhook message itself might look like — just data sent over the internet:
{
"event": "payment.completed",
"order_id": "ABC123",
"customer": "Jane D.",
"item": "Blue T-Shirt",
"amount": 25.00,
"time": "2026-04-14T08:30:00Z"
}
Knowledge Check
Test what you learned with this quick quiz.