Skip to content
TelegramWhatsApp

Dictionary

Webhook

A webhook is an HTTP callback mechanism that allows one system to send real-time data to another system whenever a specific event occurs. Unlike traditional API polling, where your application repeatedly asks a server whether anything has changed, webhooks use a push model: the source system sends an HTTP POST request to a URL you specify the moment an event happens. This eliminates wasted requests, reduces server load, and enables near-instantaneous event-driven communication between applications.

Webhooks are foundational to modern web architecture because they connect services that were not designed to work together natively. Payment processors like Stripe send webhooks when a charge succeeds, fails, or is disputed, allowing your application to update order status without constantly polling the Stripe API. Content management systems fire webhooks when content is published or updated, triggering static site rebuilds or cache invalidation. CI/CD pipelines use webhooks from version control platforms like GitHub to start automated builds and deployments whenever code is pushed to a repository.

Implementing webhooks correctly requires attention to reliability and security. Because webhooks are essentially incoming HTTP requests from external services, you need to verify that each request actually came from the expected source, typically by validating a cryptographic signature included in the request headers. You also need to handle failures gracefully: if your endpoint is temporarily down, you will miss events unless the sending service retries delivery. Most well-designed webhook systems include retry logic with exponential backoff, and your receiving application should be idempotent, meaning it can safely process the same event more than once without creating duplicate records or side effects.