This guide will walk you through the process of setting up a store in Stripe, creating products, retrieving product IDs, and configuring them in your .env file for your Next.js 14 SaaS application.
- If you don't already have a Stripe account, sign up at the Stripe website. If you have an account, log in to your dashboard.
- Once logged in to your Stripe dashboard, navigate to the "Products" section on the left-hand sidebar.
- Click on the "Add product" button.
- Fill in the product details, including the name, description, and price. You can also add images if needed.
- Make sure to set the price and currency according to your needs.
- After filling in all necessary details, click the "Save product" button.
- In the Stripe dashboard, go to the "Products" section where you will see a list of all the products you have created.
- Click on a product to view its details.
- In the product details page, you will see the product ID at the top. It usually looks something like prod_ABC123.
- Add the following lines to your .env file, replacing prod_ABC123 with your actual product IDs:
1
2
NEXT_PUBLIC_STRIPE_BEGINNER=""
NEXT_PUBLIC_STRIPE_PRO=""