# load-stripe

> Load the promisified stripe api in the browser.

Latest version **1.0.3** (published 2016-07-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install load-stripe
pnpm add load-stripe
yarn add load-stripe
bun add load-stripe
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-07-13 |
| First published | 2016-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Dylan Piercey |
| Maintainers | dylanpiercey |
| Keywords | async, loader, promise, stripe, stripe-as-promised |

## Links

- npm: https://www.npmjs.com/package/load-stripe
- Repository: https://github.com/DylanPiercey/load-stripe
- Issues: https://github.com/DylanPiercey/load-stripe/issues
- npm.io page: https://npm.io/package/load-stripe

## Dependencies (2)

- [simple-load-script](https://npm.io/package/simple-load-script.md) ^1.0.0
- [stripe-as-promised](https://npm.io/package/stripe-as-promised.md) ^2.0.0

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-07-13
- 1.0.2 — 2016-07-13
- 1.0.1 — 2016-07-13
- 1.0.0 — 2016-05-03

## README

# Load Stripe
Asynchronously loads the stripe javascript api in the browser returning a promise.
The stripe api is also `promisified` using [stripe-as-promised](https://github.com/bendrucker/stripe-as-promised).

# Installation

#### Npm
```console
npm install load-stripe
```

# Example

```js
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!

---
_Source: https://npm.io/package/load-stripe · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
