Overview
Direct Answer
A webhook is a user-defined HTTP callback mechanism that enables one application to send real-time event notifications to another application's designated endpoint when a specific condition or trigger occurs. Unlike traditional polling, webhooks push data immediately upon event occurrence rather than requiring the receiving system to request updates at intervals.
How It Works
When a monitored event is triggered in the source application, the system constructs an HTTP request (typically POST) containing event data and transmits it to a pre-configured URL endpoint on the target system. The target application receives and processes this payload synchronously or queues it for asynchronous handling, then returns a status response. If delivery fails, the source application may implement retry logic with exponential backoff to ensure reliability.
Why It Matters
Webhooks eliminate latency inherent in polling-based architectures, reducing bandwidth consumption and enabling genuinely real-time system integration. This matters for payment processing, incident alerting, inventory synchronisation, and customer communication workflows where delays carry financial or operational consequences.
Common Applications
Payment gateways use webhooks to notify merchants of transaction results; project management platforms trigger notifications on task updates; version control systems alert deployment pipelines when code is committed; and customer relationship management systems synchronise data changes with accounting software.
Key Considerations
Webhook implementations must address security concerns including request validation, authentication tokens, and HTTPS enforcement. Ordering guarantees are not provided by most webhook systems, requiring idempotency handling on the receiver side to prevent duplicate processing.
Cross-References(1)
More in Software Engineering
Integration Testing
Quality & TestingTesting the interaction between different software modules or components to verify they work together correctly.
Circuit Breaker Pattern
ArchitectureA design pattern that prevents cascading failures by stopping calls to a failing service temporarily.
Caching
ArchitectureStoring frequently accessed data in a fast-access storage layer to reduce latency and improve performance.
Git
Development PracticesA distributed version control system for tracking changes in source code during software development.
Event Loop
Paradigms & PatternsA programming construct that waits for and dispatches events or messages in a program.
Garbage Collection
Paradigms & PatternsAutomatic memory management that reclaims memory occupied by objects no longer referenced by the program.
Continuous Delivery
Development PracticesA software practice where code changes can be released to production at any time through automated pipelines.
Concurrency
ArchitectureThe ability of a system to handle multiple tasks simultaneously by interleaving their execution.