An open API service indexing awesome lists of open source software.

https://github.com/streamich/stripe-web

Typesafe Stripe for browser
https://github.com/streamich/stripe-web

Last synced: 11 months ago
JSON representation

Typesafe Stripe for browser

Awesome Lists containing this project

README

          

# stripe-web

- This lib is WIP
- TypeScript typings for Stripe web bundle
- `loadStripe()` loads Stripe bundle from `https://js.stripe.com/v3/`
- `getStripe()` returns global Stripe object, if one present

## Install

```shell
npm i stripe-web
```

## Usage

```js
import {loadStripe, getStripe} from 'stripe-web';

const Stripe = await loadStripe();
const Stripe = getStripe();

const stripe = Stripe('pk_...');

stripe.elements();
stripe.paymentRequest();
/// etc...
```

## License

MIT