Adding Stripe Payments to Your Ruby on Rails Application
2h 5mIntermediate2016-12-16
Authors

Chris Oliver
Ruby on Rails, Python, founder of GoRails and LaunchCode
Course details
Add Stripe to your Ruby on Rails application to collect payments from your users. Stripe allows developers to add Payment Card Industry-compliant ecommerce functionality without having to implement complicated security. The result is an efficient and secure app experience, with fully encrypted token-based transactions that allow you to charge for content on a monthly or annual basis. In this course, Chris Oliver teaches you how to build a Rails app with paid content, securely collect credit card numbers, charge your users for a subscription to your site, and give them access to the paid content, all with Stripe.js and the Stripe Ruby gem. You'll also learn how to allow customers to unsubscribe and resubscribe from the app, and create PDF receipts for charges.
Learning objectives
Adding users and products to the application
Creating a checkout form
Creating and sending card tokens
Subscribing the customer
Charging the customer
Allowing users to update payment info, cancel, and resubscribe
Adding receipts with webhooks
Learning objectives
Adding users and products to the application
Creating a checkout form
Creating and sending card tokens
Subscribing the customer
Charging the customer
Allowing users to update payment info, cancel, and resubscribe
Adding receipts with webhooks
Skills covered
Stripe APIStripeRuby on RailsBack-End Web DevelopmentFull-Stack Web DevelopmentProjectWeb DevelopmentOpen Source
Concepts
1. Introducing the Course
- 01 - What we'll be covering
- 02 - What you need to know
- 03 - Using the exercise files
2. Building the Application
- 04 - Adding products
- 05 - Adding users
- 06 - Setting up Bootstrap
3. Creating the Checkout Form with Stripe.js
- 07 - Signing up for Stripe
- 08 - Adding a new subscription page
- 09 - Creating a card token using Stripe.js
- 10 - Sending a card token to the server
- 11 - Making it turbolinks compatible
4. Charging the Customer Server-Side
- 12 - Installing the Stripe gem
- 13 - Creating a plan in Stripe
- 14 - Creating a customer in Stripe
- 15 - Subscribing the customer in Stripe
- 16 - Handling card errors
- 17 - Protecting products for only paid users
5. Allowing Users to Update Their Card
- 18 - Displaying the subscription and card on file
- 19 - Reusing the payment form
6. Allowing Users to Cancel and Resubscribe
- 20 - Cancelling a subscription
- 21 - Resubscribing using a new card
- 22 - Resubscribing using an existing card
7. Adding Receipts with Webhooks
- 23 - Adding the stripe event gem
- 24 - Listening to a charge.succeeded event
- 25 - Creating a charge model
- 26 - Displaying charges in the account page
- 27 - Making PDF receipts
- 28 - Rendering PDF receipts
Conclusion
- 29 - Next steps