/sample-17-braintree-subscription-node

A subscription created using Nodejs

Primary LanguageJavaScript

Using the Braintree API in Node to process a subscription payment

This is an example of the Braintree API using the official Node SDK in Express to set up a subscription.

This branch includes a lot of files for the purpose of testing. To see a simplified example please switch to the simplified branch.

This demo performs the following technical implementations:

  • Pulling existing plans from Braintree server
  • Creating a new customer
  • Processing a subscription

Technology

This demo uses

Running the demo locally

  • Run npm install to install all dependencies
  • Run npm start to start the Express app
  • Visit http://127.0.0.1:3000/ in your browser
  • Fill in the form using PayPal or a Credit Card:
  • Click Subscribe Now
  • You will receive a message that says "Subscription Successful"

Running the test

  • Requirement: CasperJS
  • Run npm test to start the test

Useful links