Glossary7 min readUpdated October 15, 2026

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.
Want to go further? AskChatGPTClaudePerplexityGrok
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

  1. You register an endpoint URL, pick the event types you need, and receive a signing secret (Stripe's starts with whsec_).
  2. Something happens to a payment: it succeeds, fails, is refunded or is disputed.
  3. The provider sends an HTTPS POST with the event as JSON, plus a signature.
  4. Your server verifies the signature against the raw request body.
  5. It stores the event and returns a 2xx code right away. Adyen marks a webhook as failing if no answer arrives within 10 seconds.
  6. A background job processes the event: mark the order paid, start fulfillment, open a dispute case.
  7. 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 happenedStripe eventAdyen eventCode
Payment succeededpayment_intent.succeededAUTHORISATION, success true
Payment failedpayment_intent.payment_failedAUTHORISATION, success false
Delayed method (bank debit) finally paidcheckout.session.async_payment_succeededAUTHORISATION
Manual capture donecharge.capturedCAPTURE (not sent for automatic captures by default)
Refund, full or partialcharge.refundedREFUND, or REFUND_FAILED
Dispute openedcharge.dispute.createdNOTIFICATION_OF_CHARGEBACK
Dispute funds takencharge.dispute.funds_withdrawnCHARGEBACK
Dispute closedcharge.dispute.closed (won, lost or warning_closed)Other dispute codes, such as SECOND_CHARGEBACK
Subscription renewalinvoice.paid, invoice.payment_failedNot 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.

Start free

Webhook vs API polling vs postback

WebhookAPI pollingPostback
Who starts the callThe provider, when an event happensYour server, on a timerA tracker, when a conversion happens
DirectionProvider to youYou to providerTracker to a partner's URL
SpeedAs events happenAs often as you pollAs conversions happen
Typical usePayment, refund and dispute updatesBackup checks, reconciliationAffiliate and ad conversion tracking
Main riskDuplicates and out-of-order eventsMissed changes between polls, rate limitsLost 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

  1. The same event twiceDelivery is at least once. At Adyen, duplicates share eventCode and pspReferenceLog event IDs; at Adyen, use the latest event
  2. 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
  3. Retries after an outageStripe retries up to 3 days in live mode; Adyen up to 30 daysMake every handler safe to run twice
  4. 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)

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.

Nick Bonnassies

CMO at Tagada

CMO at Tagada. Before Tagada, Nick built direct-to-consumer brands that generated over $115M in sales, raised over $25M in crowdfunding and sold two of them. He also works as a fractional CMO on marketing operations and AI systems.

Frequently asked questions

What is webhook data?

It is the body of the webhook request, usually JSON. A payment event carries an event ID, an event type such as charge.refunded, a creation time, a live or test flag and the object that changed, such as the payment with its amount, currency and status. Headers carry the signature used to check the sender.

What is a webhook in a payment gateway?

It is the message the gateway sends to your server when a payment changes state: authorized, failed, captured, refunded, disputed or paid out. You register a URL and pick the events. The gateway then POSTs each event to that URL, so your store can mark orders paid or flag a dispute without checking by hand.

What is the difference between a webhook and an API?

With an API, your code sends a request and gets an answer. With a webhook, the provider sends the request to you when something happens. You use the API to create a payment or a refund, and the webhook to learn the final result, which can arrive seconds or weeks later.

What is a webhook endpoint?

It is the public HTTPS URL on your server that receives webhook requests, for example https://example.com/webhooks/stripe. It must accept POST requests, sit outside your login layer, verify the signature, and return a 2xx code quickly. Stripe treats redirects as failures, so register the final URL.

What happens if my webhook endpoint is down?

The provider retries. Stripe retries for up to three days with exponential backoff in live mode, and you can resend an event from the Dashboard for 15 days or with the CLI for 30 days. Adyen moves the webhook to a retry queue and keeps trying for up to 30 days.

Are webhooks secure?

They are if you verify them. Providers sign each request with a secret shared with you, using HMAC with SHA-256. Recompute the signature, compare it in constant time, reject old timestamps to stop replays, use HTTPS, and allowlist the provider's IP addresses when it publishes them.

Sources

Checked October 15, 2026
  1. Stripe Docs, Receive Stripe events in your webhook endpoint (read October 14, 2026)
  2. Stripe API Reference, The Event object (read October 14, 2026)
  3. Stripe API Reference, Types of events (read October 14, 2026)
  4. Adyen Docs, Handle webhook events (read October 14, 2026)
  5. Adyen Docs, Webhook structure and types (read October 14, 2026)
  6. Adyen Docs, Verify HMAC signatures (read October 14, 2026)
  7. Adyen Docs, Troubleshoot webhooks (read October 14, 2026)
  8. 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.

  1. 01Create your free account
  2. 02Connect your store or build a checkout
  3. 03Launch funnels, upsells and subscriptions