Skip to content

One of my first implementations of NodeJS/Express regarding the Stripe API to change a customer's card on file using their email and the new billing info. It basically finds the user, finds their card on file, deletes it, and adds the new one.

Notifications You must be signed in to change notification settings

philberhane/update-card-stripe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stripe Card Update

This project is to update card information on Stripe (delete the current card & save a new one) The following steps are needed for this to work:

  1. Clone this repo

  2. Install dependencies by running 'npm install' on the terminal while in the root folder

  3. Go to Stripe's website, log in, and enable Test Mode (there should be a 'View Test Data' on bottom of the page)

  4. While on Stripe's website, create a test customer with an arbitrary email and random card information (the actual card number must be '4242424242424242')

  5. Also, while on Stripe's website, take note of your Private and Public API Keys

  6. In the main.js file (root -> Client -> js -> main.js), edit the 'pk_test_...' string on line 2 with your public API Key

  7. In the index.js file (root -> Server -> routes -> indes.js), edit the 'sk_test_...' string on line 14 with your private API Key

  8. Run 'node app.js' on the terminal while in the Server folder

  9. On your browser, type in 'localhost:3000' as the URL.

  10. The email being input MUST match the test customer's email. Also, the card number must be 4242424242424242

About

One of my first implementations of NodeJS/Express regarding the Stripe API to change a customer's card on file using their email and the new billing info. It basically finds the user, finds their card on file, deletes it, and adds the new one.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages