Examples
A hosted Playground to receive signed webhooks right away, and two complete applications that install the published package.
Try the Playground
playground.good-webhooks.dev is a public app built on the published package. Sign in with GitHub, add an HTTPS endpoint, and receive signed clock.ticked and ping.requested events within minutes, with delivery history, retries, replay, and test events in the browser. Its source is a complete Next.js and worker deployment, and it is where the library is dogfooded.
Complete applications
Both applications live under examples/. They install good-webhooks from npm, so you can copy either one into your own repository.
Order fulfillment
A shop sends orders to a warehouse. Transactional publish, retries against a failing receiver, replay, and receiver deduplication.
Better Auth billing
Users sign in, register their own endpoints, and receive invoice events. Real sessions, per-user scopes, and a separate worker.
Run locally
You need Node.js 24, npm, and Docker with Compose. In the example directory:
npm ci
docker compose up -d --wait
npm run setup
npm run devOpen http://127.0.0.1:4311 for order fulfillment or http://127.0.0.1:4312 for billing. Keep the generated .env between restarts: it holds the key that encrypts registered endpoint secrets. Each README has a walkthrough and test instructions.
Smaller checked examples
The library's repository has short, type-checked examples that these docs include verbatim:
| Example | Shows |
|---|---|
examples/basic | Rollback, retry, replay, and receiver deduplication |
examples/transactions | Payload-dependent recipient selection in a transaction |
examples/better-auth | Auth instance, delivery engine, and worker split |
examples/operations | Supervised worker and bounded cleanup entrypoints |