Simple stripe checkout implementation in Rails.
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
-
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.