A webhook is a way for one application to send real-time data to another application the moment something happens, instead of the second application having to keep checking for updates. It works by registering a URL (an endpoint) with the source service. When a specific event occurs, the source service sends an HTTP POST request to that URL with details about the event. The receiving service processes the data and takes whatever action is needed. No polling, no delays, no wasted requests.
Compare this to how you might check for a package delivery. Without a webhook, you would walk to the front door every five minutes to see if the package arrived. That is polling, and most of the time there is nothing there. With a webhook, the delivery driver rings the doorbell the moment the package lands on your doorstep. You only respond when there is actually something to respond to. The doorbell is the webhook.
Webhooks are everywhere in modern software. Stripe sends a webhook when a payment succeeds or fails. GitHub sends a webhook when someone pushes code to a repository, which triggers your CI/CD pipeline to run tests and deploy. Slack sends a webhook when a message is posted to a channel. Shopify sends webhooks for new orders, updated inventory, and canceled subscriptions. In each case, the pattern is the same: register a URL, pick which events you care about, and your server receives the data in real time.
Building a webhook receiver means setting up an HTTP endpoint that accepts POST requests, validates the payload (usually by checking a signature or secret token to confirm it came from the expected source), processes the data, and returns a 200 status code to acknowledge receipt. If your endpoint fails to respond, most services will retry the delivery several times with increasing delays. Good webhook implementations are idempotent, meaning processing the same event twice does not cause problems, because network issues can occasionally result in duplicate deliveries. Webhooks replace the need for constant polling and are the backbone of event-driven integrations between services.