Skip to content

Commit 49176f5

Browse files
readme update
1 parent 0406a03 commit 49176f5

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

README.md

+28-25
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
Use [Stripe.js](https://stripe.com/docs/stripe-js) as an ES module.
44

5-
**Note**: For compliance reasons, Stripe.js must be loaded directly from
6-
`https://js.stripe.com`, and cannot be included in a bundle or hosted yourself.
7-
This package wraps the global `Stripe` function provided by the Stripe.js
8-
script as an ES module.
5+
**Note**: To be
6+
[PCI compliant](https://stripe.com/docs/security#validating-pci-compliance), you
7+
must load Stripe.js directly from `https://js.stripe.com`. You cannot included
8+
it in a bundle or host it yourself. This package wraps the global `Stripe`
9+
function provided by the Stripe.js script as an ES module.
910

1011
[![npm version](https://img.shields.io/npm/v/@stripe/stripe-js.svg?style=flat-square)](https://www.npmjs.com/package/@stripe/stripe-js)
1112

@@ -20,21 +21,22 @@ each page of your site.
2021
<script src="https://js.stripe.com/v3/"></script>
2122
```
2223

23-
Then import and use Stripe.js as you would any other module.
24+
Then import and use Stripe.js as you would any other module.
2425

2526
```js
2627
import {Stripe} from '@stripe/stripe-js';
2728

2829
const stripe = Stripe('pk_test_TYooMQauvdEDq54NiTphI7jx');
2930
```
3031

31-
We’ve placed a random API key in this example. Replace it with your [actual
32-
publishable API keys](https://dashboard.stripe.com/account/apikeys) to test
33-
this code through your Stripe account.
32+
We’ve placed a random API key in this example. Replace it with your
33+
[actual publishable API keys](https://dashboard.stripe.com/account/apikeys) to
34+
test this code through your Stripe account.
3435

35-
For more information on how to use Stripe.js, please refer to the [Stripe.js
36-
API reference](https://stripe.com/docs/js) or learn to [accept
37-
a payment](https://stripe.com/docs/payments/accept-a-payment) with Stripe.
36+
For more information on how to use Stripe.js, please refer to the
37+
[Stripe.js API reference](https://stripe.com/docs/js) or learn to
38+
[accept a payment](https://stripe.com/docs/payments/accept-a-payment) with
39+
Stripe.
3840

3941
### `loadStripe`
4042

@@ -48,20 +50,21 @@ import {loadStripe} from '@stripe/stripe-js';
4850
const stripe = await loadStripe('pk_test_TYooMQauvdEDq54NiTphI7jx');
4951
```
5052

51-
We’ve placed a random API key in this example. Replace it with your [actual
52-
publishable API keys](https://dashboard.stripe.com/account/apikeys) to test
53-
this code through your Stripe account.
53+
We’ve placed a random API key in this example. Replace it with your
54+
[actual publishable API keys](https://dashboard.stripe.com/account/apikeys) to
55+
test this code through your Stripe account.
5456

5557
For more information on how to use Stripe.js once it loads, please refer to the
56-
[Stripe.js API reference](https://stripe.com/docs/js) or learn to [accept
57-
a payment](https://stripe.com/docs/payments/accept-a-payment) with Stripe.
58+
[Stripe.js API reference](https://stripe.com/docs/js) or learn to
59+
[accept a payment](https://stripe.com/docs/payments/accept-a-payment) with
60+
Stripe.
5861

5962
## Ensuring Stripe.js is available everywhere
6063

61-
To best leverage Stripe’s advanced fraud functionality, ensure that Stripe.js
62-
is loaded on every page, not just your checkout page. This allows Stripe to
63-
detect anomalous behavior that may be indicative of fraud as customers browse
64-
your website.
64+
To best leverage Stripe’s advanced fraud functionality, ensure that Stripe.js is
65+
loaded on every page, not just your checkout page. This allows Stripe to detect
66+
anomalous behavior that may be indicative of fraud as customers browse your
67+
website.
6568

6669
If you are adding the `<script>` tag manually, make sure you do so on every
6770
page. If you are relying on the script insertion that this module provides, and
@@ -81,9 +84,9 @@ import '@stripe/stripe-js';
8184

8285
### Manually include the script tag
8386

84-
Manually add the Stripe.js script tag to the `<head>` of each page on your
85-
site. If you use `loadStripe`, it will use this script tag rather than
86-
inserting a new one.
87+
Manually add the Stripe.js script tag to the `<head>` of each page on your site.
88+
If you use `loadStripe`, it will use this script tag rather than inserting a new
89+
one.
8790

8891
```html
8992
<!-- Somewhere in your site's <head> -->
@@ -98,5 +101,5 @@ inserting a new one.
98101

99102
### Contributing
100103

101-
If you would like to contribute to React Stripe.js, please make sure to read
102-
our [contributor guidelines](CONTRIBUTING.md).
104+
If you would like to contribute to React Stripe.js, please make sure to read our
105+
[contributor guidelines](CONTRIBUTING.md).

0 commit comments

Comments
 (0)