@fixers/stripe-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Stripe-js

This package is ESM only!

Just like the old good @stripe/stripe-js, but no side-effects, no console logs and no warnings.

Usage

import { loadStripe } from '@fixers/stripe-js'

// Stripe.js will not be loaded until `loadStripe` is called
const stripe = await loadStripe('pk_test_TYooMQauvdEDq54NiTphI7jx')

Disabling advanced fraud detection signals

If you would like to disable advanced fraud detection altogether, you need to manually load the script:

import { loadScript } from '@fixers/stripe-js'

const stripe = await loadScript({
  advancedFraudSignals: true
})

// Note: stripe is undefined in SSR
return stripe('pk_test_TYooMQauvdEDq54NiTphI7jx')

Readme

Keywords

Package Sidebar

Install

npm i @fixers/stripe-js

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

8.41 kB

Total Files

6

Last publish

Collaborators

  • lucacicada