Skip to content

lgs/stripe-recurring-subscriptions

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stripe-recurring-subscriptions

Important Note 📌

An updated version of this codebase is available here: stripe-subscriptions-sca

The updated version shows you how to set up recurring subscriptions that support SCA (Strong Customer Authentication).

We recommend checking out the following tutorials, which complement the new codebase:

🌟How to Set up a Basic Node Application with Stripe

🌟How to use Stripe’s new Payment Intents API with Node.js to create subscriptions with built-in SCA

Overview

This repository shows you how to create recurring subscriptions with Stripe and Node.js.

It uses Express for creating a simple server, Nunjucks for templating, and the Stripe API.

It features

  1. An Admin View when you can create Stripe Products and Plans via the Stripe API.
  2. A Client View where your users can view and pay for your subscription plans.

Demo Video

Tutorial

We’ve written a detailed, 3-part tutorial about this code on the 🌟 CodeNebula blog: Creating Monthly Recurring Subscriptions in Stripe using Node.js

Instructions

  1. Clone this repository
  2. Run npm install to install all dependencies
  3. Create a .env file to house your Stripe Secret Key (this repo includes .env in its .gitignore)
  4. In the .env file, set your secret key as STRIPE_API_KEY (STRIPE_API_KEY="sk_test_************************")
  5. In the Javascript section of the views/signUp.html file, replace var stripe = Stripe("pk_test_************************") with your Stripe Publishable Key
  6. Run the app via npm start
  7. Navigate to localhost:3000

Releases

No releases published

Packages

No packages published

Languages

  • HTML 56.5%
  • JavaScript 25.5%
  • CSS 18.0%