# What is a webhook?

A webhook is a message one service sends to your address the moment something happens: a payment goes through, a form is filled in, an order arrives. You don't ask for it. It comes to you.

## Tell your AI

1. Connect BitHut to your AI (Claude, ChatGPT or Codex): add the address `https://api.bithut.app/mcp`. How: https://bithut.app/connect.md
2. Then tell it:

```
Make a webhook receiver for my Stripe payments on BitHut
```

## The short answer

A webhook is an automatic message from one service to another. You give a service (Stripe, Tally, Shopify, GitHub) an internet address. When an event happens on their side, they send a short note about it to that address, usually as JSON over HTTPS. Your program at that address reads the note and does something: adds a row to a sheet, sends you a Telegram message, saves an order.

GitHub puts it this way: webhooks deliver notifications "to an external web server whenever certain events occur" ([GitHub](https://docs.github.com/en/webhooks/about-webhooks)).

## An everyday analogy

Think of a parcel delivery.

- **Without a webhook** you open the tracking page every ten minutes to see if the parcel has arrived. That is asking, again and again.
- **With a webhook** the courier rings your doorbell when the parcel is there. You gave your address once, and you hear about it the moment it happens.

The doorbell only works if someone is home. That is the whole difficulty with webhooks, and most of this page is about it.

## Webhook vs API

Both move data between services. The difference is who starts the conversation.

| | API | Webhook |
|---|---|---|
| Who starts | your program asks the service | the service tells your program |
| When | whenever your program asks | the moment the event happens |
| Direction | pull | push |
| What you need | a key to the service | a public address that is always on |
| Typical use | "give me last week's orders" | "an order just came in" |

GitHub describes the API way as polling, "calling an API intermittently", while with a webhook you express interest once, when you create it ([GitHub](https://docs.github.com/en/webhooks/about-webhooks)). In practice many projects use both: the webhook says something happened, then the program calls the API for the full details.

## Real examples

Each link goes to the service's own webhook documentation, checked 22 November 2026.

- **Stripe, a payment.** When a customer's bank confirms a payment or a charge is disputed, Stripe sends an event such as `invoice.paid` to your address ([Stripe](https://docs.stripe.com/webhooks)).
- **Tally, a form.** The trigger is a new form submission, and Tally webhooks are free for all Tally users ([Tally](https://tally.so/help/webhooks)).
- **Typeform, a form.** Each new response is sent to your address right away ([Typeform](https://www.typeform.com/developers/webhooks/)).
- **Shopify, an order.** The `orders/create` topic fires when an order is created in a shop ([Shopify](https://shopify.dev/docs/apps/build/webhooks)).
- **GitHub, a push.** GitHub notifies your server when code is pushed, an issue is opened and so on ([GitHub](https://docs.github.com/en/webhooks/about-webhooks)).
- **Telegram, a bot.** A bot gets new messages either by asking Telegram (`getUpdates`) or through a webhook; the two are "mutually exclusive" ([Telegram Bot API](https://core.telegram.org/bots/api#setwebhook)).

**A note on Discord.** A Discord webhook works the other way round. Discord calls it "a low-effort way to post messages to channels": you send a message to Discord's address, and it appears in a channel ([Discord](https://docs.discord.com/developers/resources/webhook)). So with Discord you are the sender, not the receiver. You don't need a server for that.

## Are webhooks free?

Sending is usually part of the service: Tally, for example, includes webhooks on every plan ([Tally](https://tally.so/help/webhooks)). What costs money is the receiving end, the address that has to be up day and night. That can be a free tier of a tool, a paid automation plan or a hosting plan. The options are below.

## What you need to receive one

These rules come straight from the services that send webhooks.

1. **A public HTTPS address.** Stripe requires HTTPS in live mode ([Stripe](https://docs.stripe.com/webhooks)). Telegram requires an HTTPS address on port 443, 80, 88 or 8443 ([Telegram](https://core.telegram.org/bots/api#setwebhook)).
2. **Always on.** The message comes when the event happens, not when it suits you.
3. **A quick answer.** Reply "OK" (any 2xx status) first, do the slow work after. Stripe says to return a 2xx "before any complex logic" ([Stripe](https://docs.stripe.com/webhooks)). GitHub gives you 10 seconds ([GitHub](https://docs.github.com/en/webhooks/using-webhooks/best-practices-for-using-webhooks)), Tally 10 seconds ([Tally](https://tally.so/help/webhooks)), Typeform 30 seconds ([Typeform](https://www.typeform.com/developers/webhooks/)).
4. **Check the signature.** Anyone who learns your address can send it fake data. Stripe signs every event in the `Stripe-Signature` header, and you check it with a signing secret that starts with `whsec_` ([Stripe](https://docs.stripe.com/webhooks)). Shopify uses `X-Shopify-Hmac-Sha256` ([Shopify](https://shopify.dev/docs/apps/build/webhooks)), Tally `Tally-Signature` ([Tally](https://tally.so/help/webhooks)), Telegram `X-Telegram-Bot-Api-Secret-Token` ([Telegram](https://core.telegram.org/bots/api#setwebhook)). Keep the secret with your keys, not in the code.
5. **Expect retries.** If your address doesn't answer, the sender tries again later. In live mode Stripe keeps trying for up to three days, with growing gaps ([Stripe](https://docs.stripe.com/webhooks)). Tally retries after 5 minutes, 30 minutes, 1 hour, 6 hours and a day, then emails the form owner ([Tally](https://tally.so/help/webhooks)). GitHub does not promise to retry; it says to redeliver missed webhooks yourself once your server is back ([GitHub](https://docs.github.com/en/webhooks/using-webhooks/best-practices-for-using-webhooks)).
6. **Ignore duplicates.** The same event can arrive twice. Stripe advises recording the event IDs you have processed and skipping ones you've seen ([Stripe](https://docs.stripe.com/webhooks)); Shopify suggests the `X-Shopify-Webhook-Id` header for the same job ([Shopify](https://shopify.dev/docs/apps/build/webhooks)). Otherwise one payment can become two rows in your sheet.

## Why your laptop can't receive them

A laptop at home has no public address. Your router hides it from the internet, so Stripe has nowhere to send the message. The usual fix is a tunnel such as ngrok, which gives your laptop a temporary public address. Its free plan includes 1 GB of outgoing data and one development domain ([ngrok pricing](https://ngrok.com/pricing), checked 22 November 2026).

A tunnel is fine for testing. It is not a home for a real receiver: when the laptop sleeps, the address stops answering, and events pile up in retries or get lost. More on this in [BitHut or your laptop](/alternatives/laptop).

## Ways to receive webhooks

Prices and limits checked 22 November 2026.

| Option | What it is | Cost to start | Good for |
|---|---|---|---|
| **Zapier** | catch a webhook, then pick actions in a visual editor | Webhooks by Zapier is not on the Free plan ([Zapier help](https://help.zapier.com/hc/en-us/articles/8496288690317-Trigger-Zaps-from-webhooks)); Professional from $19.99/month billed yearly, $29.99 monthly, 750 tasks ([pricing](https://zapier.com/pricing)) | simple "when X, do Y" with no code |
| **Make** | a custom webhook starts a scenario | up to 300 requests per 10 seconds per webhook; unused webhooks switch off after 5 days ([Make help](https://help.make.com/webhooks)) | visual flows with more steps |
| **Serverless function** | a few lines of code that run only when a request comes | Cloudflare Workers Free: 100,000 requests a day; paid from $5/month ([Cloudflare](https://developers.cloudflare.com/workers/platform/pricing/)) | people comfortable with code and a cloud console |
| **BitHut** | your AI writes the receiver and puts it online | from $5/month, see [pricing](/pricing) | receivers that save data, use a database, or grow into a bigger project |

**Zapier or Make** are the better choice when the job is short and standard, such as a new Tally answer to a Google Sheet, and you prefer clicking to code. Comparisons: [BitHut or Zapier](/alternatives/zapier), [BitHut or Make](/alternatives/make).

**A serverless function** is the cheapest when you can write and deploy code yourself and the receiver keeps no data of its own.

## Receiving webhooks on BitHut

On BitHut a webhook receiver is an ordinary project of the kind "receives data". You tell your AI what should happen when the message arrives, and it writes and deploys the code.

- **A public HTTPS address** like `name-account.up.bithut.app`, or your own domain. It runs all the time, with no laptop and no tunnel. Sites start private behind a password page, and you open them when you want.
- **A journal of incoming requests.** You and your AI see what actually arrived and when, which is usually the first question when "the webhook doesn't work".
- **Signing secrets stored apart from the code**, like any other key.
- **A persistent disk and Postgres**, so the receiver can remember which event IDs it has already handled.
- **A message to you when it breaks**, with a task your AI can use to fix it, plus logs and rollback to an earlier version.
- **One price for the account**: any number of projects within the plan, and the bill never grows on its own. There is no free plan.

Ready-made starting points: [Stripe payments to a sheet](/templates/stripe-payments-to-sheets), [lead intake form](/templates/lead-intake), [shop orders to Telegram](/templates/shop-orders-to-telegram), and the whole category of projects that [receive data](/templates/receives-data).
