polar webhook listen streams your organization’s webhook
events to a local URL, and polar webhook trigger sends realistic sample events
whenever you need one, without waiting for a real checkout or subscription.
Receive webhooks locally
1
Sign in and choose an organization
Terminal
2
Start listening
Point the CLI at the URL your webhook handler listens on:A port alone works too:
Terminal
polar webhook listen 3000 forwards to
http://localhost:3000, and polar webhook listen 3000/api/webhooks to that route.3
Set the webhook secret
Events are signed with the secret shown in the banner, exactly like
production deliveries. Configure your handler with it so signature
verification passes:To write it without starting a session, print the secret and exit:
.env
Terminal
Ctrl+C to stop.
Events follow the active organization’s environment. Listen with a sandbox
organization while developing, and switch with
polar auth org when you need
production events.Trigger sample events
polar webhook trigger delivers through your listen session, so start
polar webhook listen in one terminal first. Without an active session, the
trigger fails. Then send a sample event from another terminal:
Terminal
listen session, and reports where it went. Nothing is created in your
organization. Run it without an event name to pick one from a list, or print
the catalog:
Terminal
Shape the payload
Override any field withpath=value, repeating the flag as needed. Values are
sent as text unless you pass null, a JSON object, an array or a quoted string:
Terminal
--seed to make them deterministic, so the same seed always produces the same
payload, which is handy for scripted tests:
Terminal
Inspect without sending
Print the payload instead of delivering it:Terminal

