Skip to main content
Definition Website Computer and Technology

Webhook

Subject: Computer and Technology noun /ˈwɛbˌhʊk/ 1 definition

  1. Definition (noun)

    Entry #329 · Updated

    A Webhook (also known as a web callback or HTTP push API) is an event-driven integration mechanism that enables a provider system to deliver real-time notifications to a consumer application over HTTP or HTTPS. Rather than repeatedly polling an endpoint for updates, the consumer registers a target callback URL and desired event subscriptions with the provider in advance. When a matching event fires, the provider serializes the event data—typically as a JSON payload—into an HTTP POST request signed with an HMAC header or shared secret and dispatches it directly to the registered endpoint. Unlike client-initiated polling or persistent bidirectional protocols such as WebSockets, webhooks rely on stateless, unidirectional HTTP requests to eliminate polling overhead and reduce latency, while requiring receivers to implement signature verification, idempotent processing for retries, and rapid acknowledgment.

    Common Forms

    • Full-Payload Webhooks: Embed the entire serialized event object and modified resource fields directly in the HTTP POST body, allowing consumers to process notifications immediately without making follow-up API requests.

    • Thin-Payload (Reference) Webhooks: Deliver only a minimal event identifier, timestamp, and resource reference, requiring the subscriber to fetch the latest state from the provider's authenticated API while limiting sensitive data exposure.

    • Incoming Connector Webhooks: Expose a unique, secret-tokenized URL on a receiving application (such as Slack or a CI/CD server) so external scripts and monitoring tools can push alerts or trigger builds via a single HTTP POST.

    • Synchronous Admission Webhooks: Pause an in-flight operation until the target endpoint responds with an approval, rejection, or mutated payload, commonly used in Kubernetes admission controllers and real-time authorization pipelines.

    Example

    When a customer completes a $49.00 subscription payment, Stripe sends an HTTPS POST request containing a JSON invoice.paid payload and a Stripe-Signature HMAC-SHA256 header to the merchant's registered https://api.example.com/webhooks/billing endpoint. The merchant's Express handler verifies the cryptographic signature with its webhook signing secret, immediately returns 200 OK to avoid timeout retries, and pushes the event ID onto a Redis queue for asynchronous fulfillment.