1
Creating a Product in Stripe
2
Updating The stripe_price_id Inside The Codebase
In this example, we’re updating the stripe_price_id for the ESSENTIALS plan for the MONTHLY subscription.The exact same logic applies to all other plans when updating their stripe_price_id. For instance, when adding the annual plan for the INDIE HACKER plan we just have to get its price id from Stripe and insert it into the appropiate object inside our pricing.config.ts file.
3
Updating the Stripe Secret Key
TL / DR: You should have a stripe secret key in the .env.local file that can be found in the
Stripe Dashboard under the API Keys tab.
4
Enabling Stripe Billing Portal
Search for Customer Portal in the Stripe Dashboard and enable it by clicking Activate Link. This
will enable the Stripe Billing Portal.
5
Setting up the Stripe CLI
- Install the Stripe CLI using brew:
- Log in to Stripe via the CLI:
- Start the Stripe webhook listener:
- You will now receive a webhook signing secret from the Stripe CLI. Update the
.env.local
file with it: