Mantissa Hooksnode is a Mantissa product A Mantissa product mantissatech.xyz

Send one Stripe webhook to several services

Author:
hooksnode
Published:
Updated:
  • stripe
  • webhooks
  • fan-out

Short answer: to send Stripe webhooks to multiple endpoints, either register up to 16 event destinations in Stripe, or register one Hooksnode URL and add a destination per service behind it. Hooksnode checks Stripe-Signature once, then each service gets its own copy, filter and retries.

Stripe lets you register up to 16 event destinations. Receive Stripe events (checked 2026-11-17) says: "You can register up to 16 event destinations with Stripe." One Hooksnode URL is an operational choice. If you have two services and you are happy managing two Stripe endpoints, you may not need this.

The operational case has four parts, all from that same page (checked 2026-11-17):

  1. One secret per endpoint, per mode. Stripe generates a unique secret for each endpoint. The same URL used with both test and live API keys has a different secret for each mode. N services means N whsec_ secrets per mode to sync and rotate.
  2. One event list and one failure state per endpoint. You choose the event types when you create the destination. The next retry, when there is one, is on that destination's Event deliveries tab in Workbench.
  3. Retries are per endpoint, and they can stop. In live mode Stripe retries a destination for up to three days with exponential backoff. In a sandbox it retries three times over a few hours. If the destination is disabled or deleted when a retry is due, Stripe stops future retries of that event. Listing and resending what you missed is in Missed Stripe webhook events.
  4. One pattern next to Paystack and Flutterwave. Teams that already fan those providers out through Hooksnode get the same shape here: one URL, filters, and a retry schedule per service.

If events are failing the signature check, see Stripe webhook signature verification failed (and how to fix it).

This tutorial puts Hooksnode between Stripe and your services. Stripe sends each event to one Hooksnode URL. Hooksnode checks Stripe-Signature, saves the event, and delivers a copy to every destination you add, each with its own queue and retries.

You will:

  1. Create a Hooksnode project and webhook source.
  2. Turn on the Stripe signing preset on the source.
  3. Create one Stripe event destination that points at that URL.
  4. Add one destination per service, with filters.
  5. Verify X-Hooksnode-Signature in each service.
  6. Make each handler idempotent, because delivery is at least once.
  7. Optionally, test against localhost with the Hooksnode CLI.

When 16 Stripe endpoints are enough

Sixteen destinations covers a small set of services. Use Stripe's own destinations when:

  • You have a handful of services, and each team can hold its own whsec_ secret for test and for live.
  • Each service can keep its own event list and its own view of failed deliveries in Workbench.
  • You do not also need the Paystack or Flutterwave fan-out.

Use one Hooksnode URL when you want one secret, one Event deliveries view, and one three-day retry schedule in front of every service. A disabled or deleted Stripe destination stops future retries of that event (Receive Stripe events, checked 2026-11-17). The rest of this page is that setup.

How the setup looks

Stripe  ->  https://hooksnode.com/p/<source-id>  ->  billing
                                                  ->  provisioning
                                                  ->  crm
                                                  ->  notifications

For each destination, Hooksnode:

  • Keeps a separate queue, attempt log and retry schedule. A failing CRM does not slow billing.
  • Retries a failed delivery (any non-2xx answer, or no answer within 15 seconds) for up to 25 delivery attempts in total. The wait between attempts grows and never goes over 1 hour, so all attempts span about 17.5 hours.
  • Marks a delivery dead after the last failed attempt. You can then retry it from the dashboard, or retry failed deliveries in a batch.
  • Saves each event to its database before it is queued.

Step 1: Create a project and a webhook source

  1. Sign up at hooksnode.com/register with email, Google or GitHub.
  2. On first sign-in, the dashboard asks you to create a workspace and a project.
  3. Each project starts with one webhook source. Its URL looks like this:
https://hooksnode.com/p/<source-id>

Copy it from the project page. The default source has the same ID as the project.

Tip: use separate Hooksnode projects for Stripe test mode and live mode, so test events never reach production services. Stripe uses a different whsec_ secret for each mode, even on the same URL (Receive Stripe events, checked 2026-11-17).

Step 2: Turn on the Stripe signing preset

Hooksnode can check Stripe's signature before it accepts an event, so forged requests never reach your services. Create the Stripe destination in Step 3 first if you do not have the whsec_ secret yet. Reveal secret on that destination is the value you paste here.

  1. Open the source and turn on Require signature verification.
  2. Under Signature format, choose Stripe.
  3. Paste the endpoint's whsec_ secret into Stripe secret, then press Save format. Keep the whsec_ prefix. The field removes spaces at the ends and stores the rest as pasted. Use the test secret on a test project and the live secret on a live project. Use the stripe listen secret only for events the Stripe CLI forwards. That CLI secret is a different value from a Workbench endpoint secret (Receive Stripe events, checked 2026-11-17).

The Stripe preset checks Stripe-Signature at ingress. It computes HMAC SHA256 of the unix timestamp, a dot, and the raw body, using the pasted secret string as the key, and it accepts any v1. A timestamp more than 300 seconds before or after the Hooksnode clock is rejected. A missing, malformed, or mismatched signature is stored as rejected, answered with 401, and not delivered. If that source is over the reject storage limit, Hooksnode still answers 401 and does not deliver, and it does not store the row.

Stripe's own signing scheme is the same shape: the signed payload is the timestamp, a ., and the raw body, HMAC SHA256, and any v1 may match (Receive Stripe events, checked 2026-11-17). The full failure checklist is in Stripe webhook signature verification failed (and how to fix it).

Step 3: Create one Stripe event destination

In Workbench, create one event destination for the Hooksnode URL. Stripe's docs (checked 2026-11-17) describe it this way:

  1. Open the Webhooks tab in Workbench.
  2. Click Create an event destination.
  3. Select the account, then the payload format. For a snapshot destination, also select the API version.
  4. Select the event types every downstream service needs. Stripe says to listen only to the types your integration requires. You can change that list later, on this destination.
  5. Choose Webhook endpoint and set the Endpoint URL to your Hooksnode source URL.
  6. On the webhook settings page, copy the whsec_ secret (Reveal secret) into the source from Step 2 if you have not already.

One destination means one secret, one event list, and one row in Event deliveries. Your services do not each get a Stripe endpoint.

Step 4: Add a destination for each service

Add a destination before you send events. On the project Free plan, a project with no active destination that receives the event refuses it with 400 ({"error":"no destinations configured"}). A project on the Pro plan that is not awaiting payment stores an event with no destination as buffered instead of refusing it.

For each service, open Destinations, Add destination and fill in:

Setting What to enter
Name A label, for example Billing
URL The service's public HTTPS endpoint, for example https://billing.example.com/webhooks/stripe
Filter Optional. Only send matching events (below)
Transform Optional. Reshape the body with a Go text/template
Extra headers Optional. For example an Authorization header your service expects
Signing Off by default. Turn on Sign outbound requests and copy Signing secret (recommended, see Step 5)
Active Turn off to pause deliveries without deleting the destination

Destinations must be public endpoints. Hooksnode refuses localhost, private and internal ranges and cloud metadata addresses. Use the CLI (Step 7) for local testing.

Filters: send each service only what it needs

A filter is a JSON object of path and value pairs. All keys must match. These examples match a snapshot Event body, which has type and data.object. A thin payload can use different paths. Paste a real body into the destination Test panel and read whether the filter matches, before you rely on it.

Billing, payment_intent.succeeded only:

{ "type": "payment_intent.succeeded" }

Provisioning, subscription events. A value such as customer.subscription.* is not filter syntax. * is not a wildcard here. The prefix operator matches the start of the string:

{ "type": { "prefix": "customer.subscription." } }

The trailing dot keeps customer.subscription.created and leaves out a type that merely begins with the same letters. A list is the other form, when you want specific types:

{ "type": ["customer.subscription.created", "customer.subscription.updated", "customer.subscription.deleted"] }

Filters support equality, nested paths (data.object.id), and "any of" lists. Operator objects add prefix (used above), plus eq, neq, in, nin, gt, gte, lt, lte, contains, suffix, matches, and exists. Filters run after the transform, so write them against the transformed body.

A filtered-out event shows as delivered for that destination, with status code 0 and the response {"filtered":true}.

Headers your services receive

Hooksnode builds the outgoing headers in this order (later steps win):

  1. The headers of the incoming Stripe request, except Cookie, Authorization, X-Forwarded-*, Forwarded, X-Real-IP, Proxy-* and inbound X-Hooksnode-*.
  2. The destination's extra headers.
  3. X-Hooksnode-Source-Id: <source-id>.
  4. X-Hooksnode-Signature: sha256=<hex>, if signing is on.

Stripe-Signature is forwarded. Retries and replays send that same header again. They do not re-sign it. Step 5 is why that matters.

Step 5: Verify signatures at each destination

Hooksnode already checked Stripe's signature on the way in (Step 2). Each service behind Hooksnode is still a public endpoint, though, so it should check that a request really came from Hooksnode.

Verify X-Hooksnode-Signature, not Stripe-Signature.

On the destination, open Signing and turn on Sign outbound requests. Hooksnode generates a 64-character hex secret. You cannot type your own secret when you create the destination, and the API does not accept a secret value. Turning signing on generates it. Regenerate replaces it, and the previous secret stops matching immediately. Copy Signing secret from the destination page.

With the default signature format (Hooksnode), each attempt sends:

X-Hooksnode-Signature: sha256=<hex>

That hex is the HMAC SHA256 of the body actually delivered (after any transform), keyed with that destination's secret. It has no timestamp, so a later retry still verifies. The destination can instead use the Mantissa format, t=<unix seconds>,v1=<hex>, which is an HMAC SHA256 of the timestamp, a dot, and the delivered body, signed when that attempt is sent. Either way, Hooksnode signs its own header at delivery time. It does not reuse a previous provider signature.

Node.js (Express), default format:

import crypto from "node:crypto";
import express from "express";

const app = express();

app.post("/webhooks/hooksnode", express.raw({ type: "*/*" }), (req, res) => {
  const expected =
    "sha256=" +
    crypto.createHmac("sha256", process.env.HOOKSNODE_SECRET).update(req.body).digest("hex");
  const given = req.get("X-Hooksnode-Signature") ?? "";
  const ok =
    given.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(given), Buffer.from(expected));
  if (!ok) return res.sendStatus(401);

  const event = JSON.parse(req.body);
  // Hand off to idempotent processing (Step 6), then answer fast.
  res.sendStatus(200);
});

Python (Flask):

import hashlib, hmac, os
from flask import Flask, abort, request

app = Flask(__name__)
SECRET = os.environ["HOOKSNODE_SECRET"].encode()

@app.post("/webhooks/hooksnode")
def hooksnode():
    body = request.get_data()
    expected = "sha256=" + hmac.new(SECRET, body, hashlib.sha256).hexdigest()
    given = request.headers.get("X-Hooksnode-Signature", "")
    if not hmac.compare_digest(given, expected):
        abort(401)
    event = request.get_json()
    # Hand off to idempotent processing (Step 6).
    return "", 200

Always hash the raw body. Parsing and re-serialising the JSON changes the bytes and breaks the check. This signature works even when a destination uses a transform, and each service only needs its own Hooksnode secret, not your Stripe whsec_ secret.

The Hooksnode signature carries no timestamp, so it does not stop replays on its own. Idempotent handling (Step 6) covers that.

Do not verify Stripe-Signature on the service

Hooksnode forwards the original Stripe-Signature and does not re-sign it on retries or replays. Stripe's libraries default to 5 minutes between that timestamp and your clock (Receive Stripe events, checked 2026-11-17). A destination that verifies Stripe-Signature itself can succeed on the first delivery and fail once the original timestamp is outside that tolerance, even though the body is unchanged. A Hooksnode retry more than 5 minutes after Stripe signed the event fails that check. Stripe signs each of its own retries with a new timestamp (Receive Stripe events, checked 2026-11-17). A Hooksnode retry does not. A transform makes this worse: the forwarded signature was computed over the original body, so it will not match a transformed body.

Step 6: Make every handler idempotent

Hooksnode delivers at least once, never exactly once. A service can receive the same event twice. For example, your endpoint did the work but timed out before it answered, so Hooksnode retried.

Stripe can also send the same event more than once. Log the event id (evt_...) and skip ids you have already processed (Receive Stripe events, checked 2026-11-17). The same page says two separate Event objects can be sent for one change. To identify those, also key on the id in data.object plus the event type. The sample below is for a snapshot Event, which has those fields. The handler that stops a second credit is in Why your payment webhook arrived twice.

What Hooksnode deduplicates on the way in

With the Stripe preset on, Hooksnode ignores X-Idempotency-Key. It drops an exact resend of the same body and the same Stripe-Signature within 10 minutes, and answers 200 with:

{"status":"duplicate","message":"already accepted"}

Treat a response where status == "duplicate" as success. Match on the status field, not on the message text. Stripe signs each of its own retries with a new timestamp, so that retry is a new signature, including inside the 10 minutes, and Hooksnode delivers it again (Receive Stripe events, checked 2026-11-17).

Duplicates on the way out

Each service must be safe to run twice for the same event:

  1. Record event.id (evt_...).
  2. Also record event.type plus data.object.id when that object id is present, because two Event objects can describe one change.
  3. Do the work only when both inserts are new, in the same database transaction.

PostgreSQL example:

CREATE TABLE processed_events (
  event_id   text PRIMARY KEY,
  handled_at timestamptz NOT NULL DEFAULT now()
);
async function handleStripeEvent(db, event) {
  const eventId = event.id;
  const objectId = event.data && event.data.object && event.data.object.id;
  const changeId = objectId ? `${event.type}:${objectId}` : "";

  await db.tx(async (t) => {
    const eventRow = await t.oneOrNone(
      `INSERT INTO processed_events (event_id) VALUES ($1)
       ON CONFLICT (event_id) DO NOTHING
       RETURNING event_id`,
      [eventId]
    );
    if (!eventRow) return; // This evt_ was already handled. Still answer 200.

    if (changeId) {
      const changeRow = await t.oneOrNone(
        `INSERT INTO processed_events (event_id) VALUES ($1)
         ON CONFLICT (event_id) DO NOTHING
         RETURNING event_id`,
        [changeId]
      );
      if (!changeRow) return; // A different evt_ already covered this object and type.
    }

    await t.none(
      `INSERT INTO ledger_entries (stripe_id, amount, currency)
       VALUES ($1, $2, $3)`,
      [objectId, event.data.object.amount, event.data.object.currency]
    );
  });
}

When a duplicate arrives, answer 200. Answering with an error makes Hooksnode retry an event you already handled.

Also answer fast. Hooksnode waits 15 seconds per attempt. Do slow work (emails, third-party API calls) in a job queue after you have recorded the event.

Step 7 (optional): Test against localhost

Destinations must be public, but the Hooksnode CLI can stream a project's live webhooks to your laptop with no tunnel. The walkthrough is Test real webhooks on your laptop.

Install (macOS with Homebrew):

brew install mantissatech/tap/hooksnode

Or on macOS and Linux:

curl -fsSL https://github.com/mantissatech/hooksnode-cli/releases/latest/download/install.sh | sh

Create an API key in the dashboard (workspace, API keys, Create key), then:

hooksnode login
hooksnode listen 3000 --project <project-id> --path /webhooks/stripe

Each event the project receives is copied to http://localhost:3000/webhooks/stripe with the original method, headers and body. listen only sends events that arrive while it is connected. A listen copy keeps the original headers. A dashboard replay does too, and it does not re-sign Stripe-Signature, so verify X-Hooksnode-Signature on the service under test. The copy does not affect real deliveries.

Use a separate dev project pointed at Stripe test mode, so your tests never reach production destinations.

Step 8: Watch deliveries

Open Events in the dashboard. Each event shows its headers, body and every delivery attempt per destination. From there you can retry a failed delivery, or batch retry failed deliveries once a broken service is fixed. Failure emails go to workspace members who can see that project.

Every 15 minutes, Hooksnode sends a HEAD request to each active destination. A 5xx or no answer marks it unhealthy; a 4xx marks it degraded.

Plans and limits

Hooksnode charges 1 credit per inbound event, so one Stripe event fanned out to five destinations uses one credit. Checked against the public plans API on 2026-11-17.

Project plan Price Credits per month Sources Destinations
project Free $0 100,000 (hard cap) 1 5
project Pro $10/month 1,000,000 (hard cap) 10 50

Both levels are a hard cap. When the workspace has no credits left, Hooksnode stores the event as held and answers 202, until the hold limits. For project Free, with no paid project in the workspace, those limits are 1,000 held events, 50 MB stored, and a body larger than 64 KB is not held. A paid project Pro plan raises the event and byte caps. Workspace Pro ($50 a month, public plans API, checked 2026-11-17) does too. Past a limit, the answer is 402. Stripe will still retry on its own schedule for up to three days in live mode (Receive Stripe events, checked 2026-11-17), so watch usage before a destination is disabled. The project Free plan covers this tutorial: one Stripe source and up to five destinations.

Checklist

  • Require signature verification on, Signature format set to Stripe, whsec_ pasted into Stripe secret
  • One Stripe event destination set to https://hooksnode.com/p/<source-id>, with only the event types your services need
  • Separate projects for test and live
  • At least one destination added before going live
  • Filters tested in the destination Test panel
  • Sign outbound requests on for each destination, and each service verifies X-Hooksnode-Signature
  • Handlers record event.id, and event.type plus data.object.id for snapshot events
  • Handlers answer 200 fast, including for duplicates

FAQ

What is a Stripe webhook endpoint?

A Stripe webhook endpoint, which Stripe's docs call an event destination, is a public HTTPS URL that Stripe POSTs events to. Each one has its own list of event types and its own whsec_ signing secret. In live mode Stripe retries a failed delivery for up to three days (docs.stripe.com/webhooks, checked 2026-11-26).

Does Stripe allow only one webhook URL?

No. Stripe's docs say you can register up to 16 event destinations (docs.stripe.com/webhooks, checked 2026-11-17). One Hooksnode URL is for operations: fewer secrets, one event list, and one retry pattern. If two Stripe endpoints are easy to run, you may not need it.

How does a destination filter match customer.subscription events?

A payload filter does not treat * as a wildcard. Use {"type":{"prefix":"customer.subscription."}} so the type must start with that text. Equality and lists also work, for example {"type":"payment_intent.succeeded"}.

Why does Stripe-Signature fail on a Hooksnode retry?

Hooksnode forwards the original Stripe-Signature and does not re-sign it on retries or replays. Stripe's libraries default to a 5 minute tolerance (docs.stripe.com/webhooks, checked 2026-11-17). After that, verify X-Hooksnode-Signature instead.

Can the same Stripe event reach a service more than once?

Yes. Hooksnode delivers at least once, never exactly once. Track the Stripe event id (evt_...). Stripe can also send two Event objects for one change, so also key on the data.object id plus the event type (docs.stripe.com/webhooks, checked 2026-11-17).

Further reading