DEV Community

Alejandro Foronda
Alejandro Foronda

Posted on

Starter Template #2 | Next JS + Stripe Checkout

This template is a starter for those looking to use Next JS whit Stripe Checkout in a project.


You can check a live sample in CodeSandbox. To test the complete flow you need to open the browser in a new tab.


You can deploy the project to Zeit's NOW directly from codesandbox or by cloning this repo.



Create an .env file with STRIPE_SECRET and STRIPE_CLIENT as well as a file with STRIPE_CLIENT and any other variable that Next needs at build time.


Add CodeSandbox secrets for STRIPE_SECRET and STRIPE_CLIENT.


Keep the now.json file and add the environment variables with the NOW CLI now secrets add <secret-name> <secret-value>.

Top comments (0)