Repolode
pay-rails

pay-rails/pay

A payments engine for Ruby on Rails that adds customers, subscriptions, charges and payment methods across Stripe, Paddle, Braintree and Lemon Squeezy.

Open-source alternative to:Chargebee

Stars
2,263
Forks
359
Open issues
0
Last commit
5 days ago

What is it?

Pay is a payments engine for Ruby on Rails 6.0 and higher. It gives a Rails app a common set of models and methods for customers, payment methods, one-time charges and subscriptions, so developers do not have to write a separate integration for each payment provider.

The engine supports Stripe (with SCA compatibility), Paddle, Braintree and Lemon Squeezy, and includes a fake processor for trials without cards, free subscriptions and testing. Webhook routes are provided for handling provider events, and models can be customized. Stripe Connect is covered for marketplace use cases.

The project is a Rails engine distributed as a gem under the MIT license. Because the providers behave differently, the maintainers note that complex payment flows are best kept to a single provider.

Key features

  • 01Unified customer, payment method, charge and subscription models across providers.
  • 02Supports Stripe, Paddle, Braintree and Lemon Squeezy, with PayPal available through Paddle, Braintree and Lemon Squeezy.
  • 03Includes a fake processor for testing and trials without a card.
  • 04Provides webhook routes for handling provider events.
  • 05Offers Stripe Connect support for marketplaces.

Use cases

  • Adding subscriptions and recurring billing to a Rails SaaS app.
  • Switching or supporting multiple payment providers behind one interface.
  • Offering free trials that do not require a credit card.
  • Building a marketplace that splits payments with Stripe Connect.

Quick start

  1. 1

    Add the gem to your Gemfile

    bundle add pay
  2. 2

    Install Pay's migrations and set up the database

Things to know

  • Requires a Ruby on Rails application (Rails 6.0 or higher).
  • Payments depend on a third-party processor account such as Stripe, Paddle, Braintree or Lemon Squeezy.

Topics

FAQ

What is pay?
A payments engine for Ruby on Rails that adds customers, subscriptions, charges and payment methods across Stripe, Paddle, Braintree and Lemon Squeezy. Pay is a payments engine for Ruby on Rails 6.0 and higher. It gives a Rails app a common set of models and methods for customers, payment methods, one-time charges and subscriptions, so developers do not have to write a separate integration for each payment provider.
Is pay free to use? What license does it have?
pay is open source under the MIT license. Check the license terms before using it in commercial products.
Is pay still maintained?
Actively maintained. The last commit to pay was on Nov 2, 2026.
What can I use pay for?
Adding subscriptions and recurring billing to a Rails SaaS app. Switching or supporting multiple payment providers behind one interface. Offering free trials that do not require a credit card. Building a marketplace that splits payments with Stripe Connect.
How do I install pay?
Add the gem to your Gemfile: bundle add pay Install Pay's migrations and set up the database
Where can I get pay?
The source code and installation instructions are on GitHub: https://github.com/pay-rails/pay

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects