Engineering a Stripe Integration is Scary
How should you handle Stripe requests that timeout?
Which webhooks, if any, should you make use of? And how do you properly implement webhooks?
How should you handle each of the six different types of Stripe errors?
What is Idempotency? And how can you use it to queue and retry charges with certain types of errors?
How can you be certain your customers' credit card information is secure?
That's What The Stripe Documentation Is for!... Right?
When I wrote my first Stripe integration in a Node.js app, like any respectable software engineer, I started with the Stripe API documentation. What a pleasant surprise, they even have an official Node.js module! Up to par with the quality anything Stripe produces, the documentation is thorough and well written. Not Bad, Stripe!
When I dug into the Node module and documentation, I quickly realized it was a very simple namespaced wrapper for a huge list of RESTful resources. There is no strategy as to how to implement this module!
With very little code inside an Express route, Stripe can charge a card and respond successful, or with an error. But what do I do with those errors? Which errors should I show to the customer? Can I retry the charge (and what is this Idempotency thing)? What should I do if the Stripe request times out (with an average 99.9x% up-time, you can bet there will be times when Stripe is unreachable).
Hey now, we're Smart Engineers.
We're not going to reinvent The Wheel!
Everybody uses Stripe! Node.js is all the rage now. There must be at least a few well documented examples of a Stripe strategy authored by the intersection of those two groups. Let's Google It. I'll save you the work. Stormpath has a fairly thorough blog post for a very simple recurring plan integration with no specific error handling strategies. Then a few more blog posts, most of which are "Getting started" posts and videos. And of course there is StackOverflow, with about 140 results - most without a single answer. We're not simply programmers, we're not just developers, we're engineers and hackers dammit! We build things with style, and strategy. Not by cobbling together copy-pasted snippets from introductory examples.
Do You Really Feel Confident About Capturing Launch Day Payments?
Don isn't scared.
Don is confident in his strategy.
Be like Don.
The Node.js Engineer's Guide To Stripe bundles years of my experience of successfully integrating Stripe in Node applications for my own companies - most recently as CTO of Convoy - and my clients' products, into one comprehensive and succinct resource.
While the book is filled with detailed, working examples for every chapter, it's also written to not be prescriptive but flexible to your own style. All examples fully explain the concepts like the background queue for Stripe requests, and the Finite State Machine for cleanly storing the status of a charge. The goal is to give you true understanding, as concisely as possible, to empower you to feel confident about your Stripe integration.
The most important thing for any startup is to get the product to real customers as soon as possible: there’s a lot of talk about MVPs, but not much about what they actually look like. Scott’s book covers the complete process of building node apps where your customers can pay you - it’s essential for engineers who want to get to market now.
Comprehensive yet straight to the point, clearly laid out with code snippets and examples, this book is the perfect companion for Node.js developers who want to take payments with Stripe. Scott’s real world experience makes all the difference
What's In The Book
- Chapter 1: A lovely introduction about why Stripe is awesome!
- Chapter 2: Boilerplate Node.js application built on Express, MongoDB / Mongoose, Jade templates, and a simple front end using only jQuery
- Chapter 3: Basic Stripe integration with Checkout.js, which will get you up and running with minimal code in a few hours
- Chapter 4: Building a custom payment form, capturing the submit event of the form, and generating a token with Stripe.js
- Chapter 5: Complete explanations of the six types of Stripe errors, how to handle them, and what message to show users
- Chapter 6: Securing your application, and how to be sure you are PCI compliant, and keeping your user's payment information safe
- Chapter 7: Complete strategy for methodically developing your Stripe webhook implementation over time, and how to secure it, and use it to stay on top of events such as disputes
- Chapter 8: An Introduction to Finite State Machines, complete with state diagrams, and how to use them to keep track of the changing status of a charge with request responses and webhooks
- Chapter 9: Complete guide on implementing Kue.js to make Stripe requests in a background job, retrying them with Idempotency, and why you want to do this
- Chapter 10: Subscribing customers to recurring plans, and updating the state of the subscription your app when they don't pay
- Chapter 11 (Bonus Chapter): How to forward charges to other Stripe users via Connect, and a simple guide to implementing OAuth in Node.js
- Chapter 12 (Bonus Chapter): Accepting ACH payments with instant bank account verification powered by Plaid
- Chapter 13 (Bonus Chapter): Every key JavaScript and Node.js resource I've used over the years, compiled into a organized list with tips
Forget the Copy-Pasted StackOverflow Code and Take Control of your Stripe Integration for FREE, TODAY!
Signup for my JavaScript newsletter (unsubscribe anytime, and zero spam), and I'll email you Chapter 5 on Error handling strategies for your Stripe integration right now.
What Others are Saying
Scott knows this stuff, cold. He’s an all-star! He’s an amazing entrepreneur, solid developer, and best of all, keeps this stuff interesting, even for the novice. Read it now!
Get The Book, and Get Paid!
- All 10 Chapters on Credit Card Payments
- Instant Download in PDF, and iBook Format
- 100% Money-Back Guarantee
- Everything from
the Basic Pack - BONUS Chapters
Stripe Connect, ACH Payments, and Additional Resource Guide - Cash Money Node!
Private Slack Group
Get help from me and the community quickly! - Working Code
for Every Chapter
Written in both ES5 and ES6 - 100% Money-Back Guarantee
- UNLIMITED Seat License for an Entire Team
- BONUS Chapters
Stripe Connect, ACH Payments, and Additional Resource Guide - Private Slack Channel
Cash Money Node:
Get help from me and the community instantly! - ES6 Version of Sample App Code
- 100% Money-Back Guarantee
90-Day 100% Guarantee
If you don't find this book helpful with your Node.js Stripe integration, and are unsatisfied, email me and you'll recieve a no questions asked 100% refund.
About The Author
So who exactly writes a book about building a Stripe integration in Node.js, anyway?
My Name is Scott, and I've been writing code and doing cool things with computers since I was a little kid. It all started when my Dad brought home a HeathKit Hero 1 robot, and I programmed it to teach kids about space travel for a local museum. Since then, I've found my way into Node.js for the last several years, and have built web apps as CTO for my own company, and for clients.
I live in San Francisco, but travel a lot. When I'm not writing or building things, I hike, and fly airplanes. Follow me on Twitter @scotthasbrouck and let's meet up when we're in the same city!