What Are Webhooks, and How Do They Work in Payments?
Webhooks explained for payments: a sample event payload, the Stripe and Adyen events to listen to, retries, signatures, and webhook vs API polling.
Article summary
TL;DR
A webhook is an HTTPS request that one system sends to another the moment an event happens. In payments, the provider POSTs a JSON event to a URL on your server when a payment succeeds, fails, is refunded or is disputed. Your server checks the signature, answers with a 2xx code, then updates the order. No polling needed.
- A webhook pushes an event to you. An API call is you asking. Most payment integrations use both: the API to act, webhooks to learn the result.
- Webhook data is a JSON event: an ID, a type such as payment_intent.succeeded, a timestamp and the object that changed.
- Delivery is at least once and not in order. Store event IDs and never assume the sequence.
- Verify every request with the provider's HMAC signature, reject old timestamps, and answer within seconds.
- Stripe retries for up to three days in live mode. Adyen retries a failing webhook for up to 30 days.
On this page
Most of what happens to a payment happens after checkout. A bank debit clears days later, a refund goes through, a customer disputes a charge. Your store learns about each of these through a webhook.
What is a webhook?
A webhook is an HTTP request that a provider sends to a URL you control when an event happens. In payments, Stripe describes it as pushing "real-time data" to your endpoint over HTTPS, as a JSON payload, so you can react to asynchronous events such as a bank confirming a payment, a customer disputing a charge, or a recurring payment succeeding.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
Developers sometimes call webhooks a "reverse API": instead of your code calling the provider, the provider calls your code. The URL that receives the calls is the webhook endpoint. Stripe allows up to 16 event destinations per account, and each registered endpoint must be a publicly reachable HTTPS URL.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
How a payment webhook works
- You register an endpoint URL, pick the event types you need, and receive a signing secret (Stripe's starts with whsec_).
- Something happens to a payment: it succeeds, fails, is refunded or is disputed.
- The provider sends an HTTPS POST with the event as JSON, plus a signature.
- Your server verifies the signature against the raw request body.
- It stores the event and returns a 2xx code right away. Adyen marks a webhook as failing if no answer arrives within 10 seconds.
- A background job processes the event: mark the order paid, start fulfillment, open a dispute case.
- If your server never returned a 2xx, the provider retries later.
Flow from Stripe Docs, Receive Stripe events, and Adyen Docs, Handle webhook events.
Stripe says to return the 2xx "before any complex logic that might cause a timeout," and to process events through an asynchronous queue, because renewal peaks at the start of a month can overwhelm an endpoint.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026) Adyen gives the same order: verify, store, accept, then process.4Adyen Docs, Handle webhook events (read October 14, 2026)
What webhook data looks like
Here is a Stripe event for a successful payment, shortened. The top-level fields are the real fields of Stripe's Event object; the values are illustrative.2Stripe API Reference, The Event object (read October 14, 2026)
{
"id": "evt_1Q0example",
"object": "event",
"api_version": "2024-06-20",
"created": 1760436000,
"type": "payment_intent.succeeded",
"livemode": true,
"pending_webhooks": 1,
"request": {
"id": "req_example",
"idempotency_key": "order-10482"
},
"data": {
"object": {
"id": "pi_3Q0example",
"object": "payment_intent",
"amount": 5900,
"currency": "usd",
"status": "succeeded",
"metadata": { "order_id": "10482" }
}
}
}
Three fields do most of the work. id identifies the event, so you can spot duplicates. type tells you what happened. data.object is the payment as it was when the event fired; Stripe never changes an event after it is created.2Stripe API Reference, The Event object (read October 14, 2026) Amounts are in the smallest currency unit: 5900 means $59.00.
Adyen's format differs. Each request holds a live flag and a notificationItems array with one NotificationRequestItem for JSON webhooks. Inside: eventCode, success ("true" or "false"), pspReference, merchantReference, amount with value and currency, eventDate, and the HMAC signature in additionalData.5Adyen Docs, Webhook structure and types (read October 14, 2026)6Adyen Docs, Verify HMAC signatures (read October 14, 2026) A failed payment at Adyen is an AUTHORISATION event with success set to false, not a separate event type.
Payment events worth listening to
Stripe advises subscribing only to the events your integration needs, because extra events put "undue strain" on your server.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026) For an online store, these cover most cases:
| What happened | Stripe event | Adyen eventCode |
|---|---|---|
| Payment succeeded | payment_intent.succeeded | AUTHORISATION, success true |
| Payment failed | payment_intent.payment_failed | AUTHORISATION, success false |
| Delayed method (bank debit) finally paid | checkout.session.async_payment_succeeded | AUTHORISATION |
| Manual capture done | charge.captured | CAPTURE (not sent for automatic captures by default) |
| Refund, full or partial | charge.refunded | REFUND, or REFUND_FAILED |
| Dispute opened | charge.dispute.created | NOTIFICATION_OF_CHARGEBACK |
| Dispute funds taken | charge.dispute.funds_withdrawn | CHARGEBACK |
| Dispute closed | charge.dispute.closed (won, lost or warning_closed) | Other dispute codes, such as SECOND_CHARGEBACK |
| Subscription renewal | invoice.paid, invoice.payment_failed | Not a standard eventCode |
Event names and meanings from Stripe's event reference and Adyen's webhook types, read October 14, 2026.3Stripe API Reference, Types of events (read October 14, 2026)5Adyen Docs, Webhook structure and types (read October 14, 2026) If you pay affiliates, the refund and dispute rows are also what should reverse a commission; see affiliate marketing for that flow.
Inside Tagada
Build the funnel once, route every customer to the right offer
Checkout, upsells and subscriptions on one flow, with conditions per country, order or customer.

Webhook vs API polling vs postback
| Webhook | API polling | Postback | |
|---|---|---|---|
| Who starts the call | The provider, when an event happens | Your server, on a timer | A tracker, when a conversion happens |
| Direction | Provider to you | You to provider | Tracker to a partner's URL |
| Speed | As events happen | As often as you poll | As conversions happen |
| Typical use | Payment, refund and dispute updates | Backup checks, reconciliation | Affiliate and ad conversion tracking |
| Main risk | Duplicates and out-of-order events | Missed changes between polls, rate limits | Lost conversions if the call fails |
They work together. A common pattern is to receive the webhook, then call the API for the full, current object. Stripe suggests exactly that when events arrive out of order: if invoice.paid comes first, retrieve the invoice, charge and subscription through the API.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026) Polling stays useful as a nightly check that no event was missed.
Retries, duplicates and ordering
- The same event twiceDelivery is at least once. At Adyen, duplicates share eventCode and pspReferenceLog event IDs; at Adyen, use the latest event
- Events in the wrong orderStripe doesn't guarantee order, and created is only precise to the secondDon't sort on created. Check state through the API, or Adyen's sequenceNumber when present
- Retries after an outageStripe retries up to 3 days in live mode; Adyen up to 30 daysMake every handler safe to run twice
- A redirect (302) on your endpointStripe counts redirects as failuresRegister the final URL
Sources: Stripe Docs, Receive Stripe events; Adyen Docs, Handle webhook events and Troubleshoot webhooks.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)4Adyen Docs, Handle webhook events (read October 14, 2026)7Adyen Docs, Troubleshoot webhooks (read October 14, 2026)
The schedules differ a lot. Stripe retries live events for up to three days with exponential backoff, and sandbox events three times over a few hours. You can resend an event manually for 15 days in the Dashboard, or 30 days with the Stripe CLI.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026) Adyen, after a few failed attempts, moves the webhook to a retry queue and tries again after 30 seconds, 30 seconds, 1, 2, 5, 10, 15 and 30 minutes, then 1, 2, 4 and 8 hours, for up to 30 days. It sends an alert after 5 failed retries and another after 7 days.7Adyen Docs, Troubleshoot webhooks (read October 14, 2026) Handling duplicates safely is what idempotency means.
How to secure a webhook endpoint
Anyone can POST to a public URL. Stripe warns that without verification, an attacker could send fake events "to trigger actions like fulfilling orders."1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
- Check the signature. Stripe's
Stripe-Signatureheader holds a timestamp (t=) and a signature (v1=): an HMAC with SHA-256 of the timestamp, a dot and the raw body, keyed with your endpoint secret. Ignore any scheme other than v1, and compare in constant time.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026) - Keep the raw body. If your framework parses or reformats the body first, Stripe's check fails.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026) Adyen is the exception for payment webhooks: it signs eight fields joined by colons (
pspReference,originalReference,merchantAccountCode,merchantReference,value,currency,eventCode,success) with a hex key. Its other webhooks carry anhmacsignatureheader over the raw body.6Adyen Docs, Verify HMAC signatures (read October 14, 2026) - Reject replays. Stripe's libraries refuse events older than 5 minutes by default. Never set the tolerance to 0, which turns the check off.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
- Use HTTPS and allowlist IPs. Stripe requires HTTPS in live mode with TLS 1.2 or 1.3, and publishes the IP addresses it sends from.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
- Roll secrets. Stripe lets the old secret stay valid for up to 24 hours while you deploy the new one.1Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
If you build your own webhooks, the open Standard Webhooks specification uses the same ideas with three headers, webhook-id, webhook-timestamp and webhook-signature, and recommends using webhook-id as the idempotency key.8Standard Webhooks specification (read October 14, 2026)
What webhooks mean for an online store
Treat the webhook, not the thank-you page, as the proof of payment. A customer can pay and close the tab before the page loads. Each processor you add brings its own event names and formats, so map them to one internal list of payment states before they reach fulfillment or accounting. For the full integration checklist, see how to integrate a payment gateway; for test events, use a sandbox environment.
How Tagada helps
One checkout in front of several processors
Tagada routes payments across TagadaPay and processors such as Stripe, NMI and Airwallex with one logic, with a cascade to another processor when one is down or times out. Its checkout sends conversion tracking server side to Meta, Google and TikTok.
Frequently asked questions
What is webhook data?
What is a webhook in a payment gateway?
What is the difference between a webhook and an API?
What is a webhook endpoint?
What happens if my webhook endpoint is down?
Are webhooks secure?
Sources
Checked October 15, 2026- Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
- Stripe API Reference, The Event object (read October 14, 2026)
- Stripe API Reference, Types of events (read October 14, 2026)
- Adyen Docs, Handle webhook events (read October 14, 2026)
- Adyen Docs, Webhook structure and types (read October 14, 2026)
- Adyen Docs, Verify HMAC signatures (read October 14, 2026)
- Adyen Docs, Troubleshoot webhooks (read October 14, 2026)
- Standard Webhooks specification (read October 14, 2026)
Tagada
One checkout and one routing logic for every processor
Funnels, one-click upsells, subscription billing and payment routing, on one customer record.
- 01Create your free account
- 02Connect your store or build a checkout
- 03Launch funnels, upsells and subscriptions
