How To Setup Stripe Checkout With ExpressJS To Make A One Time Charge

When I first started researching Stripe Payments I knew very little about web development, especially backend programming languages, so when it came time to read the documentation most of it was Greek to me.

So I had to take a step back. First I decided what backend language I wanted to learn in order to figure out how to implement Stripe Payments in my own projects without the use of any 3rd party integrations or services that often add additional expenses to your project.

The backend language I decided to focus on was NodeJS, this seemed the logical choice because I already knew some JavaScript.

To get even more specific, I started studying ExpressJS which is a NodeJS framework that makes working with NodeJS a whole lot easier, especially for the novice.

Of course, I recommend reading through NodeJS documentation and ExpressJS documentation, but for a quickstart I recommend checking out these ExpressJS guides from MDN. It explains the Express Application Generator which we'll be using later in this blog post. The Express Application Generator makes our life even easier as a novice.

It was around this time when I was going through MDN guide linked above that I stumbled across this Stripe ExpressJS Checkout guide that wasn't completely over my head! Maybe it was because some of the studying had started to stick. :)

I followed the Stripe ExpressJS Checkout guide to the letter but I was still having issues getting it to work. I was getting some NodeJS/ExpressJS errors in the terminal that I couldn't understand.

What I did was start from scratch again and this time I used the Express Application Generator to build a simple ExpressJS app to start off with as a base or skeleton of sorts.

I then went back to the Stripe ExpressJS Checkout guide and followed the steps laid out. This time it worked! Success!

Give it a shot yourself and let me know how you fare. I'll be creating a blog post explaining how to deploy this ExpressJS app to the web using Heroku.

Show Comments

var.pop( )

Web Development Tips & Tricks