OtterKit's servers answer webhook endpoints whether or not anything of yours is running. --deliver adds a local mirror on top: every capture is also sent to a server on your machine, so your app under development receives real events while the public URL keeps answering on its own. If your app is down, the sender still gets its 200 and the capture is still in the log; you only miss the mirrored copy.
# Mirror every capture to localhost:3000 (port, host:port, or full URL)
npx otterkit webhook --deliver 3000
# Mirror to a specific route
npx otterkit webhook --deliver http://localhost:8787/stripe-eventsRun a command per capture#
--deliver-exec runs a shell command for each capture, instead of or alongside --deliver. The request body arrives on stdin, and the metadata arrives in environment variables. That is enough to trigger a rebuild, a test run, or a notification with no HTTP server at all.
| Variable | Contents |
|---|---|
OTTERKIT_METHOD | The request method, or EMAIL for inbox messages |
OTTERKIT_PATH | The request path |
OTTERKIT_HEADERS | The request headers as a JSON object |
OTTERKIT_VERIFIED | The signature verdict: valid, invalid, missing, or empty |
OTTERKIT_REQUEST_ID | The capture id |
OTTERKIT_RECEIVED_AT | When the request arrived |
OTTERKIT_ENDPOINT | The endpoint subdomain |
OTTERKIT_PUBLIC_URL | The endpoint’s public URL |
# Run a script whenever a verified Stripe event lands
npx otterkit webhook --verify stripe:whsec_… --deliver-exec './on-payment.sh'
# Combine both: mirror to the app and log one line per event
npx otterkit webhook --deliver 3000 --deliver-exec 'jq -r .type >> events.log'