All termsGeneralIntermediateUpdated April 10, 2026

What Is Webhooks?

Webhooks are HTTP callbacks that send real-time event notifications from one system to another. When a payment event occurs, a webhook pushes data to your endpoint instantly — no polling required.

Also known as: HTTP callback, event notification, push notification (server-side), reverse API

Key Takeaways

  • Webhooks push payment event data to your server in real time, eliminating the need for polling.
  • Always verify webhook signatures using HMAC-SHA256 to prevent spoofed or tampered payloads.
  • Design handlers to be idempotent — providers retry failed deliveries and duplicates are expected.
  • Respond with HTTP 200 immediately and process the payload asynchronously to avoid timeout failures.
  • Test webhook flows end-to-end in a sandbox environment before going live.

How Webhooks Work

Webhooks follow a straightforward event-driven pattern: your system registers a URL, an event occurs on the provider's side, and the provider delivers a JSON payload to that URL via HTTP POST. Understanding each step helps you build integrations that are both reliable and secure.

01

Register your endpoint

Log into your payment provider's dashboard (or call its API) and provide the HTTPS URL where you want to receive events. Select which event types — such as payment.captured or dispute.opened — you want to subscribe to. The provider stores your endpoint and begins routing matching events to it.

02

Event fires on the provider side

When a customer completes a payment, the payment gateway records the outcome and emits a structured event. This event contains a unique ID, a timestamp, the event type, and a full data object describing the transaction — amounts, currency, card metadata, and status codes.

03

Provider sends the HTTP POST

The provider signs the payload using HMAC-SHA256 with a shared secret and sends it as an HTTP POST to your registered URL. The signature is included in a request header (e.g., Stripe-Signature or X-Adyen-HMAC-SHA256) so you can verify authenticity before processing.

04

Your server verifies and acknowledges

Your handler recomputes the HMAC signature and compares it to the header value. If valid, it immediately returns HTTP 200 to acknowledge receipt. Returning anything other than a 2xx status code signals failure and triggers the provider's retry mechanism.

05

Payload is processed asynchronously

After acknowledging, your server enqueues the payload for background processing — updating order status, triggering fulfilment, sending confirmation emails, or writing to your analytics pipeline. Keeping processing out of the synchronous response window prevents timeouts on large batches.

Why Webhooks Matter

Webhooks are not a convenience feature — they are the operational core of any real-time payment stack. Without them, merchants resort to polling, which is slow, wasteful, and unreliable at scale.

According to Stripe's developer survey, teams using event-driven webhook architectures reduced payment reconciliation time by an average of 70% compared to polling-based approaches. Separately, research from Adyen's 2023 developer report found that webhook-driven order management decreased false payment failures (cases where an order was not fulfilled despite a successful charge) by up to 40% for high-volume merchants. A further industry benchmark from MRC (Merchant Risk Council) noted that real-time dispute notification via webhooks cuts chargeback response times from days to under four hours — a critical window given most schemes allow only 7–20 days to respond.

Why speed matters

Card networks typically give merchants 7–20 calendar days to respond to a chargeback. Webhook-driven dispute alerts fired within seconds of a dispute.opened event give ops teams the maximum possible response window.

Webhooks vs. Polling

Both webhooks and polling retrieve data from an external system, but they differ fundamentally in who initiates the data transfer, how quickly updates arrive, and what they cost at scale.

DimensionWebhooksPolling
InitiationProvider pushes to youYou pull from provider
LatencyMilliseconds (real-time)Seconds to minutes
Infrastructure costLow — only triggered by eventsHigh — constant requests
ReliabilityRetry logic built inMissed intervals = missed events
Implementation effortEndpoint + signature verificationScheduled job + diffing logic
Rate limit riskMinimalHigh on frequent intervals
ScalabilityScales with event volumeDegrades under high-frequency polling
Duplicate handlingRequired (retries are expected)Less common

For payment operations, webhooks are almost always the right choice for event-driven flows. Polling remains useful for scheduled reconciliation jobs or querying historical transaction data via a sandbox environment during testing.

Types of Webhooks

Payment providers expose several categories of webhook events. Understanding the taxonomy helps you subscribe only to what you need and design appropriate handlers for each class.

Transaction lifecycle events cover the journey of a single payment: authorization, capture, partial capture, decline, void, and refund. These are the most common and typically the first a merchant integrates.

Dispute and chargeback events notify you the moment a cardholder raises a dispute or a chargeback is filed. Providers like Adyen and Braintree include the reason code, scheme deadline, and supporting evidence requirements directly in the payload.

Subscription and recurring billing events fire on renewal attempts, failed recurring charges, trial expirations, and plan changes. These are critical for SaaS and subscription commerce operators who need to manage dunning workflows automatically.

Payout events notify you when funds settle into your bank account, flagging the settlement amount, currency, and any associated fees. Useful for automated accounting reconciliation.

Fraud and risk events are emitted when a transaction is flagged, placed in review, or rejected by the provider's fraud engine. Integrating these allows real-time hold logic in your order management system.

Account and configuration events cover changes to your merchant account — API key rotation, user permission changes, or compliance status updates. Less frequent but important for platform operators managing sub-merchants.

Best Practices

Good webhook hygiene separates integrations that degrade silently from those that recover gracefully under load, downtime, and adversarial conditions.

For Merchants

Always enable webhook notifications for at minimum four event types: payment captured, payment failed, dispute opened, and refund settled. These four cover the scenarios most likely to break your order management workflow if missed. Keep your registered endpoint URL on a dedicated subdomain (e.g., hooks.yourdomain.com) with its own rate limits and monitoring, isolated from your customer-facing application. Subscribe to your provider's status page so planned maintenance windows can be cross-referenced against webhook delivery gaps.

Store each raw payload verbatim before any transformation. This creates an audit trail for disputed transactions and simplifies debugging when your processing logic changes.

For Developers

Respond with HTTP 200 within 5 seconds — most providers timeout and retry if no response arrives within that window. Offload all business logic to an async queue (Redis, SQS, RabbitMQ) and return immediately. Implement idempotency by indexing on the event's unique ID field before writing state changes; reject duplicates silently with a 200 rather than a 4xx to avoid unnecessary retries.

When using an SDK, use the built-in webhook verification helpers rather than rolling your own HMAC code. Stripe, Adyen, and PayPal SDKs all include verified helper methods that handle timestamp tolerance and encoding edge cases automatically. Version your handlers — when a provider updates its event schema, a versioned handler lets you migrate incrementally without breaking live traffic.

Common Mistakes

Skipping signature verification. Treating any POST to your webhook URL as legitimate opens you to spoofed events that could trigger fraudulent fulfilment or false refunds. Always verify HMAC signatures on every request, even in staging.

Processing synchronously in the request handler. Performing database writes, sending emails, or calling downstream APIs inside the HTTP response cycle causes timeouts on anything over 2–3 seconds. The provider interprets the timeout as failure and retries — creating duplicates.

Assuming exactly-once delivery. Providers guarantee at-least-once delivery, not exactly-once. Any integration that does not implement idempotency will create duplicate records, double-charge customers, or fulfil orders twice when retries arrive during an outage recovery window.

Using HTTP instead of HTTPS. Sending payload data — which often includes partial card numbers, amounts, and customer identifiers — over unencrypted HTTP violates PCI DSS requirements and most provider terms of service. Every webhook endpoint must use TLS 1.2 or higher.

Not logging failed deliveries. Providers expose a webhook event log in their dashboards, but your own application should also record delivery failures and processing errors. Without local logs, debugging a missed fulfilment event days later becomes near-impossible.

Webhooks and Tagada

Tagada's payment orchestration layer is built around a unified webhook model. Rather than managing separate webhook subscriptions across each processor in your stack, Tagada normalises events from all connected payment gateways into a single, consistent event schema and delivers them to a single endpoint on your server.

Unified event stream

When you route payments across multiple processors through Tagada, you receive one normalised payment.captured event regardless of whether the underlying transaction settled via Stripe, Adyen, or Worldpay. Your handler code stays the same no matter how your routing rules change.

This matters operationally: when you add a new processor to your routing rules or run A/B tests across acquirers, your webhook handler requires zero changes. Tagada also exposes a webhook replay tool in the dashboard, letting you resend any event from the last 30 days — useful for recovering from endpoint downtime or debugging new handler logic against real production payloads.

Frequently Asked Questions

What is a webhook in payments?

A webhook is an HTTP POST request that a payment provider sends to a URL you define whenever a specific event occurs — such as a payment being authorized, a refund being issued, or a dispute being opened. Rather than requiring your server to repeatedly ask the payment provider for updates (polling), the provider pushes the data to you the moment it happens. This makes webhooks the backbone of real-time payment automation in modern commerce.

How is a webhook different from an API call?

A standard API call is a request you initiate: your server asks the payment provider for data and waits for a response. A webhook reverses the direction — the payment provider initiates the request and sends data to your server. APIs are pull-based; webhooks are push-based. In practice, most integrations use both: APIs to trigger actions (charge a card, issue a refund) and webhooks to receive asynchronous outcome notifications (payment succeeded, refund settled).

What events can trigger a payment webhook?

Common payment webhook events include payment.authorized, payment.captured, payment.failed, refund.created, refund.settled, dispute.opened, dispute.won, chargeback.received, subscription.renewed, and payout.completed. Each event carries a JSON payload describing the transaction details, amounts, timestamps, and status codes. Providers like Stripe, Adyen, and Braintree publish event catalogues with dozens of distinct event types merchants can subscribe to.

How do I secure a webhook endpoint?

The most reliable method is HMAC signature verification. The payment provider signs each payload with a shared secret using HMAC-SHA256 and includes the signature in a request header. Your server recomputes the signature on the received payload using the same secret and rejects any request where the signatures do not match. Additional best practices include enforcing HTTPS, validating the timestamp to reject replayed requests, and whitelisting the provider's IP ranges where documented.

What happens if my webhook endpoint is down?

Most payment providers implement retry logic with exponential backoff — they will re-attempt delivery over a period ranging from minutes to 72 hours depending on the provider. Stripe, for example, retries failed webhooks up to 25 times over three days. To ensure no events are lost during downtime, you should also reconcile via the provider's API periodically, treat webhooks as triggers rather than the sole source of truth, and use a message queue to buffer incoming events before processing.

What is idempotency in the context of webhooks?

Because providers retry failed deliveries, your webhook handler may receive the same event more than once. Idempotency means processing a duplicate event produces the same outcome as processing it once — no double-charges, no duplicate fulfilments. Implement this by storing the unique event ID from each webhook payload and checking it against your database before processing. If the ID already exists, acknowledge the webhook with a 200 status and skip reprocessing.

Tagada Platform

Webhooks — built into Tagada

See how Tagada handles webhooks as part of its unified commerce infrastructure. One platform for payments, checkout, and growth.