I'm about to start integrating Stripe Checkout and the Stripe Billing Portal in to my app. Does anyone have any tips or cautionary tales, pitfalls to avoid, etc.?
I don't know if this is interesting, but I actually recently did a twitch stream directly on using the stripe prebuilt checkout: https://www.twitch.tv/videos/899350352
Set a referral exclusion if you're using Google Analytics -- otherwise you won't be able to trace conversions back to their original source / landing page. (This is not unique to Stripe Checkout -- good practice for any off-site checkout product).
This is good advice!
Read the docs. They're great and they have a ton of example code on their Github.
Had a bit of fun working out how to integrate with Vue.js, which I'm using for the front end, but wasn't too bad and managed to get it working after a few hours. The back-end examples in their docs were perfect. I'm using DotNet and it was nice to see examples for that rather than having to "translate" from examples in Ruby/Rails or PHP like I often have to do.
Update: I have both the Checkout and the Billing Portal working now. It wasn't obvious that both were required, but it turns out that you can't subscribe in the Billing Portal, just upgrade or downgrade, so I ended up having to integrate both.
Integration wasn't too hard, but anyone who says they can do it with a few lines of code in an hour or two clearly hasn't used it for a subscription-based product, where you need to synchronise changes in Stripe with configuration settings in your application. Using Stripe's webhooks to notify your application that someone has upgraded, downgraded, or cancelled their subscription and then the Stripe API to get details of what's changed so you can update that user's settings (number of team members allowed and number of sites monitored in the case of SiteSentry takes a bit of effort and a bit of trial and error.
Altogether though, it's a lot of functionality for not a lot of effort, with the comfort of knowing that Stripe built and tested it and will continue to improve it.
Hey, You might want to consider using Hookdeck.io for managing your connection to stripe webhooks. Hookdeck makes working with webhooks easy & seamless. If you need help setting up, Please let me know, I could assist
Test, test and test.
For Ginevar at times I had 3 or 4 CLI tabs testing the webhook endpoints. Use test cards, stripe listen and trigger on test environment.
Feel free to ask for help if needed!
Thanks, I hadn't used the CLI before...it's fantastic! Made testing so simple, once I got the forwarding set up right.
I just read the other day about charge backs costing $15, regardless of charge price. One guy had a good amount of charge backs for like $3 products, making it 5x worse.
Mines may be an edge case. I have the need to be able to send invoices with the address on them. Being lazy I decided to have stripe collect the address. What I found out is that the address they collect isn't automatically attached to the customer they create. But it is attached to the payment method. So if you want to do that you have to have something that will fetch the address from the payment method and attach it to the customer.