Software EngineeringParadigms & Patterns

Webhook

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)

Networking & Communications

More in Software Engineering

See Also