Stripe Checkout and Customer Portal - Ruby on Rails Tutorial - 2022
ฝัง
- เผยแพร่เมื่อ 3 ม.ค. 2025
- Accepting payments has become easier than ever. Stripe is a platform that enables so many entrepreneurs to branch out and make their own way building products, tools, and services that can be paid for digitally and in many varied formats.
While Stripe Checkout is simple at face, there are a few important steps to take when adding it to a Ruby on Rails app for maximum security and compatibility. This is a concise guide on how to add Stripe Checkout and Stripe Customer Portal to your Ruby on Rails app. These two offerings complete the circle of a complete billing solution that's nearly drop-in.
⚙️ Github Repo: github.com/jus...
💻 Previously published at:
web-crunch.com...
Timestamps:
00:00:07 - Intro
00:01:24 - Overview of Stripe and requirements
00:05:04 - Final project walk-through
00:10:00 - Kicking off the project
00:13:35 - Generating the pricing page controller and view
00:19:57 - Adding a Subscription model
00:29:40 - Setting up secret credentials and Stripe API keys
00:42:55 - Add Stripe Checkout session
00:48:27 - Add success page
00:55:50 - Adding a webhooks controller and routing
01:06:53 - Listening for Stripe events
01:34:30 - Add billing controller for Stripe Customer Portal
01:47:08 - Updating view to account for signed in and subscribed users
01:51:40 - Final words
Hi, My name is Andy Leverenz and I work as a product designer and developer. For fun, I design, code, and write. Check out my blog called Web-Crunch web-crunch.com where I publish design and development tutorials with the occasional vlog.
♥️ Sponsor me on GitHub
github.com/spo...
☕️ Keep me awake. Buy me a coffee
www.buymeacoff...
📰 One-Click Subscribe:
www.youtube.co...
💎Ruby on Rails Course: HELLO RAILS
hellorails.io
💻 Check out the blog:
web-crunch.com
🦄 Check out my personal site:
justalever.com
🚀 Links:
Weekly Newsletter: digest.web-cru...
Twitter: / webcrunchblog
Github: github.com/jus...
📘Check out my book on UX Design:
"LUXD: Learn User Experience Design"
web-crunch.com...
📙 Check out my FREE book on Tumblr Theming:
"Pro Tumblr Theming"
web-crunch.com...
We all get burnt out, just know that you're not alone with needing a 4 month break haha.
Really excited to watch this while I eat dinner. Thanks for this tutorial!
Thanks man!
the two best teachers are having a discussion
Welcome back Andy! Thanks for the great content.
Nice to have you back Andy! I'm about to do a Stripe integration so this was a nice surprise.
And yes - I yelled "clsas!!!" a few times 😄
Welcome Back!!, Thanks your content rocks!
Thanks! 🙏
It's great to have you back, great tutorial as always
Thanks Pedro!
Welcome back Andy 🔥
Thanks!
This is excellent. Thank you.
Nice, can’t wait to go through this. I have a site using stripe that someone else installed, so it will be nice to know this stuff.
Love this! Thank you so much for your work.
You're a life saver
great video so far. might I suggest you look into adding the annotate gem to your projects? Provides all of the columns at the top of model files, factory files in comment form. much easier than digging into the model on rails c
I use this in a lot of my projects. Love it!
am I dreaming????? watching this tonight instead of netflix
Im curious as to why you'd need the Stripe customer_id on both subscriptions and users table.
I get cors errors