For subscriptions, we are using Stripe. Now we are going to show you how to integrate Stripe in the Next.js template and how you can add products from the Stripe Dashboard.
To get the Stripe secret key you have to have a Stripe account. If you don’t have one go ahead and create it.
For this integration, we are using the Test Mode. Before you deploy your site, make sure to Activate your Stripe account and integrate it with a real Secret Key.
Now add it to the .env file.
STRIPE_SECRET_KEY=YOUR_STRIPE_SECRET_KEY
So, we’ve added the Secret key to the .env file. Now let’s go ahead and see how you can add a product from the Stripe Dashboard.
After you’ve created the products you’ll see all of them on the Dashboard and on the Frontend under the /pricing page. As shown below: