Work Log 2022.01.12: Stripe Integration + Oura Update

Photo by Cathryn Lavery on Unsplash

[This is an experimental type of post I’m trying out. I want to record and publish more about my journey of building a solo SaaS company, and I think frequent, brief, and casual posts about what I’ve been working on and thinking about will be a good way to do so.]

I spent several hours the past few days setting up payments using Stripe Checkout and Stripe Customer Portal. I have the Checkout working, so you can go to the Billing tab in the Canopy Charts dashboard and select a plan to subscribe to, which will direct you to a Stripe-hosted checkout page where you enter payment info and make the payment.

I also have the Customer Portal working, so once you have a subscription, the Billing dashboard will show a “Manage Your Subscription” link which takes you to a Stripe-hosted page where you can make changes to your subscription.

One thing I’m happy about with this implementation is my dynamic Billing page. I don’t store any of the product or pricing info in my database; it’s all in Stripe. I don’t have any duplicated or hardcoded pricing information since I just pull it all from Stripe in order to render the Billing page. This means I can go into Stripe and make changes to my pricing structure, like say increase the price on one of my plans, and that change will be reflected next time someone loads the Billing page.

It was a little extra work to set things up this way but I’m glad I did it because it will for sure save time and potential headaches down the line.

What’s left to do to finish off the payments integration is

  1. Test all my webhook endpoints to make sure they handle events properly
  2. Add guards around the relevant features so they are only accessible if you have a sufficient subscription level

I’m guessing that work will take me through this weekend. I may also use this as an opportunity to set up some automated testing, since I think the payment flow is important enough to warrant that investment.

In other news, my Oura ring should come tomorrow which will allow me to start working on the Oura integration. You can’t get access to their API without a ring, so I had to order one before starting the work on that.

--

--

--

A visual editor for building and deploying dynamic charts

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

No-code tools are a local maximum

Quick tips on removing failed Docker container and images

Setting Up a MacBook M1 Development Machine

Building modular apps using Spring

Writeup Reverse Engineering BSides Delhi CTF 2020

#21CSkills Spotlight — Apps Lab

How our own Serverless DataPlatform reduced AWS bill by 93 %

A shallow dive into MLOps using Kubernetes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Canopy Charts

Canopy Charts

A visual editor for building and deploying dynamic charts

More from Medium

Solar Loan : A Comprehensive Guide | Glyde Solar

The origins of the Internet: BBS

Obamas Production Company Brings Sundance Film ‘Descendant’

Obamas Production Company Brings Sundance Film ‘Descendant’

Start-up Society #80: The Christmas Special 🎄