There’s no need for ngrok.
- Install the stripe CLI with brew, and run
stripe loginto login to your stripe account.
- Start your app’s dev server (e.g. localhost:3000)
stripe listen --forward-to localhost:3000/webhooks/onboardingto forward webhooks to that endpoint on your local server.
- In another terminal run
stripe trigger account.updatedto trigger a mock event to be posted to the webhook
- Get a full list of events with
stripe trigger --help(scroll up a bit)
stripe listen -jto output the json of the webhook to the terminal.
- When triggering events, some require some setup which the stripe cli conveniently does for you. But that can create some noise for your webhook (for example, if you
stripe trigger account.updated), the stripe cli will first create an account before it updates it, resulting in multiple events. To filter the noise for just the events you’re interested in, provide a comma-separated list to
stripe listen, like so:
stripe listen --forward-to localhost:3000/webhooks/onboarding --events account.updated,account.application.deauthorized
- To inspect a specific event
stripe events retrieve evt_kjsdfu23gjsjldkfj