Webhook
A webhook is a callback mechanism in which one service sends an HTTP request to a URL you provide as soon as a specific event happens. Instead of your application repeatedly asking an API whether anything changed, the provider pushes a small JSON payload the moment it does. That inverts the usual direction: your endpoint becomes the server for that call. The pattern cuts wasted requests and shortens the delay between an event and a reaction, which is why most SaaS platforms expose it. GitHub sends a webhook on every push or pull request, and teams use it to trigger builds and deployments. Stripe sends one for each payment, refund, or subscription change, so billing logic runs without polling. Slack, Shopify, and Notion offer similar hooks. Receivers must verify the signature header the sender includes, because the endpoint is public and anyone can post to it. The other common pitfall is assuming delivery is exactly once and in order. Networks fail, senders retry, and duplicates arrive, so handlers should be idempotent and should return a fast acknowledgement before doing slow work in a queue.