/stripe-checkout-rails

Sample application showing stripe checkout using ruby on rails app.

Primary LanguageRuby

Welcome

Simple stripe checkout implementation in Rails.

Contents

Controllers

The application has the following controllers:

  • Stripe/checkout_sessions
    Used to create the session to subscribe the user

  • Stripe/success_checkout
    Used to handle the success checkout

  • Stripe/cancelled_checkout
    Used to handle the cancelled checkout

  • home
    Used to show a page with the plans

Models

  • User
    Regular devise user model with the addition of a stripe_customer_id.

  • Subscription
    After a user subscribes, this model holds the data of this users subscription on stripe.

  • Plan
    Used to model the same products and prices we have on stripe.