Starter Template #2 | Next JS + Stripe Checkout

pika11 profile image Alejandro Foronda ・1 min read

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 .env.build 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>.

Posted on Jan 3 by:

pika11 profile

Alejandro Foronda


Hi! I'm Alejandro, I'm a Software Engineer who loves web technologies. I'm an education passionate looking for better ways to learn and make technology accessible to everyone.


markdown guide