Stripe Payments in 5 Minutes

How RailsFast handles subscriptions and one-time payments

By RailsFast Team

payments stripe subscriptions
Credit card payment being processed

Payments are one of the most critical features of any SaaS. Get it wrong and you lose revenue. Get it right and it just works invisibly in the background.

The Pay Gem

RailsFast uses the excellent Pay gem for Stripe integration:

# In your User model
class User < ApplicationRecord
  pay_customer
end

# Create a subscription
user.payment_processor.subscribe(plan: "pro_monthly")

# Check subscription status
user.subscribed?           # => true
user.on_trial?            # => false
user.subscription.active? # => true

Webhooks Just Work

Stripe webhooks are pre-configured and ready:

  • customer.subscription.created
  • customer.subscription.updated
  • customer.subscription.deleted
  • invoice.payment_succeeded
  • invoice.payment_failed

No manual webhook handling required.

Revenue Dashboard

Track your MRR, subscriptions, and revenue trends with the built-in Profitable dashboard. See your business metrics at a glance without integrating external analytics tools.

Try It in This Demo

This demo has Stripe in test mode. Try the checkout flow:

  1. Go to the pricing page
  2. Select a plan
  3. Use test card 4242 4242 4242 4242
  4. Complete the checkout

You'll see the full subscription flow in action.