Guide

Webhook integrations: test and receive provider webhooks locally

Stripe webhooks, GitHub webhooks, GitLab webhooks and the rest all need the same thing before you can build against them: a public URL that receives the event, and a way to get it into the handler on your machine. This page lists a guide for each provider, and every one starts with a live test URL.

All docs

Webhook guides by provider#

Each guide covers one provider from start to finish: where its webhook settings are, how it signs requests, how to make it send a test event and what it does when a delivery fails.

ProviderWhat the guide coversSignature or token header
Stripe webhooksEndpoint setup, the whsec_ webhook secret, signature checks and test events.Stripe-Signature
GitHub webhooksRepo and org webhooks, validating X-Hub-Signature-256, and redelivery.X-Hub-Signature-256
GitLab webhooksProject hooks, the X-Gitlab-Token header, and test events.X-Gitlab-Token
Shopify webhooksApp webhook subscriptions and X-Shopify-Hmac-Sha256 verification.X-Shopify-Hmac-Sha256
Clerk webhooksUser and organization events, signed by Svix.svix-signature
Svix webhooksThe svix-id, svix-timestamp and svix-signature scheme, for any Svix-powered sender.svix-signature
Square webhooksWebhook subscriptions and the signature key, which signs the URL too.x-square-hmacsha256-signature
Grafana webhooksAlerting contact points, the alert payload and test notifications.Authorization
Postmark webhooksBounce, delivery, open and inbound events, protected with Basic auth.Authorization (Basic)
Vercel webhooksDeployment events and the x-vercel-signature HMAC-SHA1 header.x-vercel-signature

Get a live test URL#

Every provider needs the same first thing: a public HTTPS URL. The quickest one is on the try page, which gives you a live webhook URL in the browser with no account. It lasts 30 minutes and shows each request as it arrives.

For one that stays up and keeps its name, create an endpoint from the CLI:

Terminal
npx otterkit login
npx otterkit webhook --daemon --subdomain stripe-dev
#   https://stripe-dev.otterkit.app

OtterKit's servers answer the provider whether or not your machine is on, and every request is kept with its headers and body. An endpoint costs $0.01 per hour while it is live and never more than $3 in any 30 days. New accounts get 10 free credits.

The same four steps for every provider#

1. Register the URL#

Paste the endpoint URL into the provider's webhook settings and choose the events you want. The provider guides say exactly where that screen is.

2. Verify the signature#

Most providers sign each request with a secret so you can tell their requests from anyone else's. Pass the secret with --verify and OtterKit checks every request on arrival and marks it valid, invalid or missing:

Terminal
npx otterkit webhook --daemon --subdomain stripe-dev --verify stripe:whsec_…
npx otterkit webhook --daemon --subdomain gh-dev --verify github:my-webhook-secret

There are presets for 16 providers, and a generic HMAC mode for the rest. See the webhooks docs.

3. Receive a test event#

Trigger an event from the provider, then read it or wait for it in a script:

Terminal
npx otterkit inspect stripe-dev --follow
npx otterkit await stripe-dev --method POST --count 1 --timeout 120s --json

4. Replay it into your local handler#

Send a captured event to your code on localhost as many times as it takes to get the handler right:

Terminal
npx otterkit replay stripe-dev --target 127.0.0.1:3000

An AI coding agent can run all four steps through the MCP server, with no terminal involved.

Questions about testing webhooks locally#

Do I need a tunnel to receive webhooks on localhost?#

Not necessarily. A tunnel delivers events live but only while your machine is awake. An always-on endpoint receives them at any time and you replay them locally. Many people use both: see tunnels.

My provider isn't listed. Will it work?#

Yes. An endpoint accepts any HTTP request from any sender. The generic HMAC mode covers signature schemes that have no preset.

Why do signature checks fail in my handler?#

The most common cause, for every provider, is verifying a parsed and re-serialized body. Signatures are computed over the raw bytes of the request.

Next steps#