finds.dev← search

// the find

RailsApps/rails-stripe-membership-saas

★ 1,133 · Ruby · updated Oct 2017

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.

A Rails 4.2 starter app wiring together Stripe (via the Payola gem), Devise, and role-based access for a tiered subscription SaaS. It covers the full payment lifecycle: signup, upgrade/downgrade, cancellation, and webhook handling for failed payments. Aimed at Rails developers who want a working reference before building their own billing system.

Payola handles the Stripe webhook plumbing (stripe_event under the hood), so subscription cancellations on failed payments work out of the box rather than being left as an exercise. Role-based plan enforcement is done with ActiveRecord enums, which is simple and queryable without a separate authorization library. Background jobs via sucker_punch keep the payment response fast by offloading MailChimp signup async. The service object pattern (CreateAdminService, CreatePlanService) keeps seeds and setup logic out of models.

Abandoned in 2017 — Rails 4.2, Ruby 2.2, and Payola itself is unmaintained and archived. Anyone adopting this is inheriting a dependency graveyard; Stripe's own APIs have changed significantly since. Roles are stored as an integer enum on the user row, so adding a new plan requires a migration and an enum redefinition — fragile for a billing system where plan changes are routine. The secrets.yml approach commits credential structure to the repo and the README explicitly mentions storing admin passwords there, which is a bad habit to copy. No test coverage for the payment flow itself, only a basic user model spec.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →