1.0.0 • Published 4 years ago

stripe-connect-functions v1.0.0

Weekly downloads
136
License
MIT
Repository
github
Last release
4 years ago

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

1.0.0

4 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago