Skip to content

💵 Load the promisified stripe api in the browser.

Notifications You must be signed in to change notification settings

MyStrengthBook/load-stripe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Load Stripe

Asynchronously loads the stripe javascript api in the browser returning a promise. The stripe api is also promisified using stripe-as-promised.

Installation

Npm

npm install load-stripe

Example

const load = require("load-stripe");

// Optionally override the stripe api version
load.version = 'https://js.stripe.com/v2/'; // This is the default.

// Async load stripe when you need it.
load("MY_PUBLISHABLE_API_KEY").then((stripe)=> {
	return stripe.card.createToken(some_source).then(...);
});

Contributions

  • Use npm test to run tests.

Please feel free to create a PR!

About

💵 Load the promisified stripe api in the browser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%