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
NoSQL Database
Paradigms & PatternsA non-relational database designed for specific data models offering flexible schemas for modern applications.
Blue-Green Deployment
Paradigms & PatternsA deployment strategy using two identical production environments to achieve zero-downtime releases.
Performance Testing
Quality & TestingEvaluating a system's speed, responsiveness, and stability under various load conditions.
Unit Testing
Quality & TestingTesting individual components or functions in isolation to verify they produce the expected output.
Version Control
Development PracticesA system that records changes to files over time so that specific versions can be recalled later.
Git
Development PracticesA distributed version control system for tracking changes in source code during software development.
Object-Relational Mapping
Paradigms & PatternsA technique that maps objects in code to relational database tables, abstracting direct SQL interaction.
Queue System
Paradigms & PatternsA data structure and infrastructure for managing asynchronous task processing and inter-service communication.