# gatsby-plugin-stripe

> Gatsby plugin that adds stripe.js to site

Latest version **1.2.4** (published 2020-02-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-plugin-stripe
pnpm add gatsby-plugin-stripe
yarn add gatsby-plugin-stripe
bun add gatsby-plugin-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.2.4 |
| Published | 2020-02-14 |
| First published | 2018-11-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Nathan Beck |
| Maintainers | njosefbeck |
| Keywords | stripe, stripe.js |

## Links

- npm: https://www.npmjs.com/package/gatsby-plugin-stripe
- Repository: https://github.com/njosefbeck/gatsby-plugin-stripe
- Homepage: https://github.com/njosefbeck/gatsby-plugin-stripe.git
- Issues: https://github.com/njosefbeck/gatsby-plugin-stripe/issues
- npm.io page: https://npm.io/package/gatsby-plugin-stripe

## Recent versions

- 1.2.4 (latest) — 2020-02-14
- 1.2.3 — 2019-09-12
- 1.2.2 — 2019-07-26
- 1.2.1 — 2019-05-24
- 1.2.0 — 2018-12-27
- 1.1.0 — 2018-12-04
- 1.0.1 — 2018-11-20
- 1.0.0 — 2018-11-17

## README

# gatsby-plugin-stripe

**THIS PROJECT IS NOW DEPRECATED. Read below for more details.**

**Stripe has now published [a wrapper for Stripe.js](https://github.com/stripe/stripe-js) that you should use instead of this plugin. For an example of it used in a React project with Stripe Elements, see [these Stripe docs](https://stripe.com/docs/stripe-js/react#elements-provider).**

**This plugin will no longer be maintained or updated. [Dragon Mart](https://dragon-mart.netlify.com/), an example site that used this plugin before, has been updated.**

---

A simple plugin that adds `stripe.js` to every page on your Gatsby site.

This is especially useful for building out a Stripe integration using Stripe [Elements](https://stripe.com/docs/elements) or the new version of [Stripe Checkout](https://stripe.com/docs/payments/checkout).

If you're using Stripe Elements, once `stripe.js` is added to your Gatsby site, you can use [Stripe's React Element components](https://github.com/stripe/react-stripe-elements) to integrate Elements into your site.

## How to use

1. Install using either npm or yarn:

```
yarn add gatsby-plugin-stripe
```

or

```
npm install gatsby-plugin-stripe
```

2. Add to ```gatsby-config.js```

```javascript
module.exports = {
  plugins: [
    `gatsby-plugin-stripe`,
  ]
}
```

To load the `<script>` tag asyncronously, pass an 'async' option in `gatsby-config.js`.

```javascript
module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-stripe`,
      options: {
        async: true,
      },
    },
  ],
}
```

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