Skip to content

sayanriju/stripe-connect-functions

Repository files navigation

stripe-connect-functions node

Travis Coveralls github David

NPM

This package provides a collection of functions to help with a Customers -> Marketplace -> Vendors Workflow using Stripe Connect.

All the provided functions internally uses the official NodeJS library for Stripe.

Example Workflow

The following activity diagrams try to elucidate a rudimentary workflow. The various stages are labelled with the librarry function names to use in each case.

https://github.com/sayanriju/stripe-connect-functions/blob/master/Stripe_Connect_Workflow_1.jpg

https://github.com/sayanriju/stripe-connect-functions/blob/master/Stripe_Connect_Workflow_2.jpg

Installation & Basic Usage

  1. Set up a Stripe Connect Account and obtain the Secret key, which is in the form sk_myapp_k9DHwQESw7ntTGzdjS7vFsHs

  2. Install:

    npm install stripe-connect-functions

  3. Initialize:

    const stripeConnect = require("stripe-connect-functions")("sk_myapp_k9DHwQESw7ntTGzdjS7vFsHs")
    // ^^ Remember to replace with your own key!
  4. Use:

    stripeConnect.fetchCustomerCards("cus_Ckc6NCwnBdzDCb")
    	.then(console.log, console.log) // returns a Promise!

For details, check the Api Docs HERE.

Testing

For Unit Tests, Ava is being used. Code Coverage is provided by nyc/istanbul. All calls to the Stripe API are stubbed.

To run the included tests:

npm run test
## Or, if you don't want code coverage:
npm run test:nocoverage

License

MIT

About

A collection of functions to help with a Customers -> Marketplace -> Vendors Workflow using Stripe Connect (https://stripe.com/connect)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •