0.0
No commit activity in last 3 years
No release in over 3 years
A Jekyll plugin for easily letting site visitors buy products you've set up in your Stripe dashboard.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.0
~> 12.3.3

Runtime

>= 3.3, < 5.0
 Project Readme

jekyll-stripe

A Jekyll plugin for easily letting site visitors buy products you've set up in your Stripe dashboard.

Installation

Add the following to your site's Gemfile:

gem 'jekyll-stripe'

Add the following to your site's _config.yml:

plugins:
  - jekyll-stripe

If you are using a Jekyll version less than 3.5.0, use the gems key instead of plugins.

Usage

Add the following right before </head> in your site's layout:

{% stripe pk_live_1234567890 %}

Where pk_live_1234567890 is your Stripe Publishable API Key. Never put your secret key here!

And then wherever you want to show a buy button, add:

{% stripe_button price_1234567890 %}

Where price_1234567890 is the API ID for the Price you want this button to be used to purchase. You can create Prices within Products in your Stripe dashboard.

If the customer cancels during checkout they'll be redirected to the page where they clicked the button.

If checkout succeeds, the customer will be redirected to the same page with -thanks appended, e.g. https://example.com/my-course-thanks/ if the button was on https://example.com/my-course/.

Use Stripe webhooks (or Zapier, etc) if you need something to happen behind the scenes after a confirmed purchase.

Known limitations

  • Ability to customize:
    • Button text
    • Button styling (though you can do this easily with CSS)
    • Success/cancel URLs
    • Other settings
  • Protection against incorrect setup
  • Protection against accidentally using secret key

Stripe docs

https://stripe.com/docs/payments/checkout/client

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/shai126/jekyll-stripe.

License

The gem is available as open source under the terms of the MIT License.