Templates
Use pre-built webhook templates to test your handlers without triggering real events.
Templates
Templates are pre-built webhook payloads that you can use to test your handlers without triggering real events. They include proper headers and can generate valid signatures.
Available Templates
GitHub
| Template ID | Event | Description |
|---|---|---|
github-push | push | Commits pushed to a repository |
github-pull_request | pull_request | Pull request opened, closed, merged, etc. |
github-issues | issues | Issue opened, closed, edited, etc. |
github-installation | installation | GitHub App installed or uninstalled |
github-installation_repositories | installation_repositories | Repos added/removed from app |
Ragie
| Template ID | Event | Description |
|---|---|---|
ragie-document_status_updated | document_status_updated | Document enters indexed, ready, or failed state |
ragie-document_deleted | document_deleted | Document is deleted |
ragie-entity_extracted | entity_extracted | Entity extraction completes |
ragie-connection_sync_started | connection_sync_started | Connection sync begins |
ragie-connection_sync_progress | connection_sync_progress | Periodic sync progress updates |
ragie-connection_sync_finished | connection_sync_finished | Connection sync completes |
ragie-connection_limit_exceeded | connection_limit_exceeded | Connection page limit exceeded |
ragie-partition_limit_exceeded | partition_limit_exceeded | Partition document limit exceeded |
Stripe
| Template ID | Event | Description |
|---|---|---|
stripe-charge_failed | charge.failed | Charge attempt fails (declined card, auth failure, etc.) |
stripe-checkout_session_completed | checkout.session.completed | Checkout session completes successfully |
stripe-payment_intent_succeeded | payment_intent.succeeded | PaymentIntent transitions to succeeded |
Recall.ai
| Template ID | Event | Description |
|---|---|---|
recall-participant_events_join | participant_events.join | Participant joined event |
recall-participant_events_leave | participant_events.leave | Participant left event |
recall-participant_events_update | participant_events.update | Participant updated details |
recall-participant_events_speech_on | participant_events.speech_on | Participant speech on |
recall-participant_events_speech_off | participant_events.speech_off | Participant speech off |
recall-participant_events_webcam_on | participant_events.webcam_on | Participant webcam on |
recall-participant_events_webcam_off | participant_events.webcam_off | Participant webcam off |
recall-participant_events_screenshare_on | participant_events.screenshare_on | Participant screenshare on |
recall-participant_events_screenshare_off | participant_events.screenshare_off | Participant screenshare off |
recall-participant_events_chat_message | participant_events.chat_message | Participant chat message |
recall-transcript_data | transcript.data | Transcript final data event |
recall-transcript_partial_data | transcript.partial_data | Transcript partial data event |
recall-bot_joining_call | bot.joining_call | Bot joining call status event |
recall-bot_in_waiting_room | bot.in_waiting_room | Bot in waiting room status event |
recall-bot_in_call_not_recording | bot.in_call_not_recording | Bot in call not recording status event |
recall-bot_recording_permission_allowed | bot.recording_permission_allowed | Bot recording permission allowed status |
recall-bot_recording_permission_denied | bot.recording_permission_denied | Bot recording permission denied status |
recall-bot_in_call_recording | bot.in_call_recording | Bot in call recording status event |
recall-bot_call_ended | bot.call_ended | Bot call ended status event |
recall-bot_done | bot.done | Bot done status event |
recall-bot_fatal | bot.fatal | Bot fatal status event |
recall-bot_breakout_room_entered | bot.breakout_room_entered | Bot breakout room entered |
recall-bot_breakout_room_left | bot.breakout_room_left | Bot breakout room left |
recall-bot_breakout_room_opened | bot.breakout_room_opened | Bot breakout room opened |
recall-bot_breakout_room_closed | bot.breakout_room_closed | Bot breakout room closed |
Recall template signing expects RECALL_WEBHOOK_SECRET to use the whsec_
format from Recall.
Stripe template signing expects STRIPE_WEBHOOK_SECRET (whsec_...) and
generates Stripe-Signature as t=<unix>,v1=<hmac_sha256>.
Stripe retries produce a new Stripe-Signature timestamp/signature per
delivery attempt. For idempotency, dedupe Stripe webhooks by body.id (event
id), not by signature value.
Commands
List Remote Templates
View all templates available from the repository:
better-webhook templates listFilter by provider:
better-webhook templates list --provider github
better-webhook templates list --provider stripeDownload Templates
Download a specific template:
better-webhook templates download github-pushDownload all available templates:
better-webhook templates download --allIf templates are already present locally, running download again skips them by default. Use --refresh to force a fresh index fetch and re-download existing templates (for both download <template-id> and download --all).
List Local Templates
View templates you've downloaded:
better-webhook templates list --localDelete a Local Template
Delete one downloaded template by exact ID:
better-webhook templates delete github-pushSearch Templates
Search by name, provider, or event:
better-webhook templates search push
better-webhook templates search githubClean Up
Remove all downloaded templates:
better-webhook templates cleanClear the template cache (forces re-fetch of the index):
better-webhook templates cache clearRunning Templates
Use the templates run command to execute a template against your endpoint:
better-webhook templates run github-push http://localhost:3000/api/webhooks/githubWith Signature Generation
To generate a valid signature, provide the webhook secret:
better-webhook templates run github-push \
http://localhost:3000/api/webhooks/github \
--secret "your-webhook-secret"
better-webhook templates run stripe-charge_failed \
http://localhost:3000/api/webhooks/stripe \
--secret "whsec_test_123"If you do not pass --secret, the CLI resolves secrets in this order:
<PROVIDER>_WEBHOOK_SECRET(for exampleGITHUB_WEBHOOK_SECRET,STRIPE_WEBHOOK_SECRET, orRAGIE_WEBHOOK_SECRET)WEBHOOK_SECRET
With Custom Headers
Add or override headers:
better-webhook templates run github-push \
http://localhost:3000/api/webhooks/github \
-H "X-Custom-Header:value"Verbose Output
See detailed request and response information:
better-webhook templates run github-push \
http://localhost:3000/api/webhooks/github \
--verboseWorkflow Example
A typical development workflow with templates:
# 1. Download templates you need
better-webhook templates download github-push
better-webhook templates download github-pull_request
# 2. Start your development server
# (in another terminal)
npm run dev
# 3. Test your webhook handler
better-webhook templates run github-push \
http://localhost:3000/api/webhooks/github \
--secret $GITHUB_WEBHOOK_SECRET
# 4. Iterate - run the same template while fixing issues
better-webhook templates run github-push \
http://localhost:3000/api/webhooks/github \
--secret $GITHUB_WEBHOOK_SECRETTemplates give you repeatable, consistent webhook payloads for testing without needing to trigger real events.