Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

gatsby-plugin-stripe

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

Stripe has now published a wrapper for 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.

This plugin will no longer be maintained or updated. Dragon Mart, 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 or the new version of Stripe Checkout.

If you're using Stripe Elements, once stripe.js is added to your Gatsby site, you can use Stripe's React Element components 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
  1. Add to gatsby-config.js
module.exports = {
  plugins: [
    `gatsby-plugin-stripe`,
  ]
}

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

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

About

[DEPRECATED] A Gatsby.js plugin that includes stripe.js in every page of your Gatsby site

Resources

Packages

No packages published