A Stripe webhook is an HTTPS POST that Stripe sends to a URL you control whenever something happens in your account, such as checkout.session.completed, and that URL can be a hand-written endpoint or a workflow trigger in a tool like Activepieces.

Your receiver must verify it, acknowledge it and handle repeats. Figures here were checked against docs.stripe.com in December 2026.
Stripe webhook setup is the process of registering an HTTPS endpoint with Stripe, then building the receiver to verify each event's signature, return a success response quickly, and skip events it has already processed.
Stripe webhook basics: events, endpoints and access
What Stripe sends and how events are named
The name does half the routing for you. Events are named resource.action, so the prefix tells you which object changed and the suffix tells you what happened. That makes filtering cheap: you subscribe by name and ignore the rest.
17 of Stripe's event types belong to Invoice, by Hookdeck's count, against 13 each for Charge and Customer, 8 each for Payment intent and Subscription, and 4 for Checkout.
Start with these four events, which most receivers wire up first. The table gives the usual next step for each.
| Event | What happened in Stripe | What a receiver typically does next |
|---|---|---|
checkout.session.completed |
A customer finished a Checkout Session | Provision access or create the order |
invoice.payment_failed |
A subscription invoice charge was declined | Start a dunning email or flag the account |
payment_intent.succeeded |
A payment was collected | Mark the payment paid and send a receipt |
charge.refunded |
A charge was refunded, in full or in part | Reverse access or update the ledger |
Note that payment_intent.succeeded and a completed checkout can both fire for one purchase. Pick one as your source of truth, or you'll fulfil twice.
In the Dashboard, open Developers, then Webhooks, then add an endpoint: paste the HTTPS URL and choose the events. Through the API, POST /v1/webhook_endpoints takes a url and an enabled_events array. Selecting named events rather than all of them keeps your logs readable.

Keys, test mode and the Stripe CLI
When a secret from the wrong mode gets copied over, the signature failures look like a bug in your code. Test mode and live mode keep separate endpoints and separate signing secrets, each starting whsec_.
For local work, stripe listen --forward-to localhost:4242/webhook relays events and prints a temporary secret.
You don't hire for this, you describe it: tell the built-in chat on Activepieces which Stripe event you want handled and it publishes a live flow in your account, the same kind of flow a person would have built in the editor.
MoneyGram, Moneypenny, Alan and FundingSocieties run Activepieces, and a flow the chat builds sits under the same RBAC and audit logs as theirs.
Every run leaves a trace anyone on the team can read, so you can see what arrived without being a developer, while the URL and secret handling stay the same.
You will not find a line for endpoints on Stripe's pricing page, which lists fees for payments and products, so the cost to plan for is your receiver's hosting or workflow runs. Registering an endpoint needs only Dashboard access to the account.
Everything below works on Activepieces' free plan. Start without code or a credit card.
Receive a test event locally
That Dashboard access is enough: run stripe listen --forward-to localhost:4242/webhook, then stripe trigger payment_intent.succeeded in a second terminal, and your handler prints a real Stripe Event.
In the Dashboard's webhook settings, add an endpoint with your public HTTPS URL and select payment_intent.succeeded. Skip this for local work. The CLI forwards events to localhost, so you need no public URL yet.
Copy the signing secret
Log in first with stripe login, then start the listener:
stripe listen --forward-to localhost:4242/webhook
It prints a signing secret beginning whsec_. That secret belongs to the CLI session and it's different from the one on a Dashboard endpoint.
Store it as an environment variable now.
Fire a test event with stripe trigger
stripe trigger payment_intent.succeeded
Run it and the CLI creates the objects behind the event in your test account, so the delivery carries data shaped like a real one. Watch the listener terminal: it shows each forwarded event and the status code your endpoint returned.
Here's a minimal receiver (Flask) that prints what arrives:
from flask import Flask, request
app = Flask(__name__)
@app.post("/webhook")
def webhook():
event = request.get_json()
print(event["id"], event["type"])
return "", 200
This acknowledges every request without checking who sent it, so it's for local testing only. Verification is the next stage.
Stripe webhook event payload fields
In a no-code builder you hit the same wall.
The "Data to Insert" panel shows a two-step flow, a Stripe "New Customer" step feeding a Gmail "Send Email" step, and under it a "Test step" notice that the step needs testing to generate sample data, with a purple "Go to step" button.

Nothing in a downstream step can reference a field until a real event has gone through, which is why you fire a test event first.
Open one up and the Event is an envelope, trimmed here:
{
"id": "evt_...",
"object": "event",
"type": "payment_intent.succeeded",
"data": {
"object": { "id": "pi_...", "object": "payment_intent", "status": "succeeded" }
}
}
Read type to route, and read the resource under data.object. Store id, because deduplication will key on it.
Stage 2: Verify the Stripe-Signature header
Verify the header by recomputing an HMAC-SHA256 over the timestamp, a dot and the raw body with your endpoint's whsec_ secret, then comparing the result to the v1 value.
The header looks like Stripe-Signature: t=1700000000,v1=5257a8..., with t the signing timestamp and v1 the signature.
To see the whole check at a glance, look at the illustration below:
- The header split into
t=andv1= - The timestamp, a dot and the raw body joined and fed with the secret into HMAC-SHA256
- The result compared to
v1 - A 300-second timestamp check

Take from it that Stripe signs bytes, not data, so anything that alters the bytes, or lets an old request through, defeats the check.
If your framework parses the JSON first and you serialise it again, key order, whitespace or escaping can shift, the HMAC changes, and every genuine event fails with a signature error.
Stripe signs bytes, not data, so anything that alters the bytes, or lets an old request through, defeats the check.
Hash the request body exactly as it arrived. Configure the route to hand you the raw buffer or string, and parse only after verification passes.
Stripe library versus manual signature verification
Use Stripe's official library where one exists for your language, such as stripe.webhooks.constructEvent in Node or stripe.Webhook.construct_event in Python. It splits the header, computes the HMAC, compares in constant time and enforces the timestamp tolerance for you.
Without a library, a manual check is fine, but you must do all four jobs yourself. Skipping the tolerance means a captured request can be replayed indefinitely, and a plain string comparison leaks timing information.
Header parsing should also accept more than one v1 value, since a secret rotation can produce several.
When verification fails, I would check the mundane causes first:
- A body parser or proxy middleware runs before your handler and consumes or rewrites the raw body.
- The secret belongs to a different endpoint. Each registered endpoint has its own
whsec_value, so a test endpoint's secret won't verify live traffic. - You are forwarding events with the Stripe CLI but using the dashboard secret. Each CLI listening session prints its own secret, and it's the one to use locally.
- The server clock has drifted far enough that the 300-second tolerance rejects valid events, so a drifting host looks like a flood of forgeries.
Easier to see it running than to read about it: set it up free, no card.
Stripe webhook retries, timeouts and production limits
Return 200 before you do real work and assume every event can arrive more than once, because Stripe treats anything other than a prompt 2xx as a failed delivery and retries it.
Return 2xx first, process after
Three seconds is Slack's window, by Shannon LLC's comparison, against 5 for Shopify, 10 for GitHub, 15 for Twilio and 30 for PayPal.
Slack's 3 seconds leaves no room for a database write plus an email call, so you must defer the email to a background process.
Copy the strictest number, not the most generous. Verify the signature, write the raw body to a queue, return 200, and let a worker do the rest.
In live mode Stripe keeps retrying a failing endpoint with backoff for up to three days, and may disable an endpoint that keeps failing. A slow handler can therefore silence your integration entirely.
Match what you see to what's causing it in the table.
| Failure mode | Symptom | Cause | Fix |
|---|---|---|---|
| Slow handler | Timeouts in the dashboard, then retries | Work done before responding | Queue first, respond, process after |
| Non-2xx response | Repeated retries, later a disabled endpoint | Exception, redirect or auth error in your route | Return 200 once verified; log failures separately |
| Duplicate delivery | Double emails or double fulfilment | Retry after a late or lost response | Dedupe on event.id |
| Out-of-order event | Status goes backwards | Events arrive in no guaranteed order | Fetch current state from the API |
| Secret mismatch | Every signature check fails | Wrong endpoint secret, or body altered before verification | Use that endpoint's secret and the raw body |
Make handlers idempotent using event.id
Put a unique constraint on event.id and insert the row before any side effect. If the insert fails, you've seen the event, so return 200 and stop. This is what makes a retry harmless.
Treat the event as a prompt, not the truth. Take the object's ID from the payload and fetch it from the Stripe API, so a late updated event can't overwrite newer data.
If your endpoint was down, resend failed events from the dashboard or list them through the Events API, which covers the past 30 days. So an outage you notice after a month leaves events you can't replay, and you must reconcile against the objects themselves.
Stage 3: Receive Stripe events in Activepieces
You do not need a server of your own to receive Stripe events in Activepieces: use its Stripe trigger, one of 751 integrations counted in its open source monorepo, or a Catch Webhook URL pasted into Stripe's dashboard.
Neither replays events you missed, so the reconciliation above still applies.
Create a flow, choose the Stripe integration as the trigger, and connect your account. The integration registers the webhook endpoint in Stripe for you, so you pick the event (here invoice.payment_failed) instead of copying URLs between tabs.
Use a restricted key where Stripe allows it, since the connection holds a credential.
Or paste a Catch Webhook URL into Stripe
Start the flow with Catch Webhook instead, copy its URL, and add it as an endpoint in Stripe's webhook settings, selecting the same event. The generic trigger accepts any POST sent to that URL.

I can't point to a built-in check of the Stripe-Signature header there, so treat the URL as a secret and assume unsigned requests would be accepted.
Build the failed-payment alert workflow
Three steps make up the workflow: catch the event, read the stored connection, and message the person who owns the account in Slack. The screenshot below shows that shape with the Slack step selected.

The Connection field points at "2. Read Connection", and "Test Step" runs it against sample data before anything is live.
After the Slack step, add one more step that writes a row to a table with the customer, invoice ID and amount. That row's your own record to reconcile against if an alert never arrives.
You pay by credits. Activepieces lists 1,000 credits at $0 a month, so a small account's failed-payment alerts can run free. At 10,000 credits the price's $20 a month, which covers a modest customer base.
At 50,000 credits it's $200, ten times the price for five times the credits, so a high-volume account should price this before committing.
When your own endpoint is the better choice
Write your own endpoint when you need to verify the signature against the raw request body, return a 2xx before slow work, or deduplicate on the event ID.
A no-code flow gives you less control over each of those, and they're the three checks this article puts ahead of business logic.
Keep Activepieces for the alert and the row, which cost 1 credit a run however many steps they have, and let your endpoint handle money movement.
Frequently asked questions
Stripe's defaults differ from what people assume, and the differences only show up when a delivery fails. That is where most leftover questions come from.
If you're asking what webhooks cost, Stripe adds no separate fee for sending them. Your cost is the infrastructure that receives them, so a slow or retry-heavy endpoint costs you compute, not Stripe fees. Check your own hosting bill before assuming "free" covers it.
Yes, several endpoints can receive the same event. Each registered endpoint gets every event type it subscribes to, and each has its own signing secret. Stripe caps endpoints per account, so don't register one per workflow.
Register one endpoint, verify and deduplicate there, then fan out internally. Reusing one secret across endpoints is the classic way to get "signature mismatch" tickets.
When a webhook works in test mode but fails live, it is a mode problem. Test and live mode are separate worlds.
An endpoint registered in test mode never receives live events, and each mode issues its own signing secret. The usual causes, in order of frequency:
- The live endpoint was never registered.
- The live deployment still holds the test signing secret.
- A secret from the Stripe CLI's local forwarding is in use. It differs from the Dashboard secret for the same endpoint.
- The live endpoint is subscribed to fewer event types than the test one.
- A proxy or framework parses and re-serializes the body before verification, which breaks the signature on the raw bytes.
Check the secret first. It takes a minute and explains most cases.
Should I poll the Stripe API instead of using webhooks?
Don't make polling your primary trigger. It adds delay, burns rate limit, and misses the moment something changed. Use webhooks to learn that something happened, and use the API to fetch current state when handling the event.
For events your endpoint was down for, a scheduled reconciliation job that lists recent objects is a sensible safety net. If you need a synchronous answer inside a request you control, such as confirming a payment before showing a page, call the API directly.
How do I replay a webhook event that failed?
Stripe retries failed deliveries automatically for a limited period, so first check whether a retry is already pending.
After that, you can resend a specific event from its page in the Dashboard, or with the Stripe CLI's events resend command, which targets an event ID and an endpoint.
Past events can only be fetched from the API for a limited window, so don't treat Stripe as your archive. Store the event ID and raw payload on receipt.
Before you replay anything, make sure your deduplication works, because replays are safe only if it does. Return a 2xx status as soon as the event is verified and recorded, even for a duplicate. Return a non-2xx only when you want Stripe to retry.



