Working with Subscriptions requires setting up the stripe webhook.

There are a couple of ways to work with the webhook.

You can setup the stripe cli and send simulated events

This is good for basic setup and testing but doesn`t test the app in an integrated way.

Another option is to use ngrok and run the full subscription flow inside your app.

To use ngrok first setup and signup for ngrok

https://ngrok.com (opens in a new tab)

Next run the npm run ngrok command

This will generate a public url. Substitute this public url as the webhook endpoint in the stripe dashboard.

Stripe will now send real webhook events to your local app, allowing you to test your app in a realistic way.