15
7 Comments

How to build a SaaS freemium billing flow with Stripe Billing

Hi IHs,
Like many of you, I also wear multiple different hats every month to bootstrap my SaaS startup, Billflow. For the next few months, I've made a promise to myself to share all my learnings through customer calls with the community. I would love your feedback along the way. Here we go:

This first guide is about how you can set up a freemium billing flow with Stripe:

Freemium architecture: There are typically five steps each user will go through during the initial onboarding:

1️⃣ User views pricing page
2️⃣ User creates a free account
3️⃣ User uses the freemium features
4️⃣ User upgrades their plan to premium
5️⃣ User manages their subscription on a billing page

Stripe Integration: Interaction with Stripe Billing starts at the point when your free user accounts upgrade to premium plans:

👉 Right pointing backhand index Plan Picker: Let's the user view premium plans and upgrade. This creates the customer and subscription in Stripe.

👉 Right pointing backhand index Customer Portal: Let's user manage subscription

It is recommended not to create the customer or subscription objects in your billing system until the account is upgraded. This is different in the case of the free-trial flow.

Setup Stripe Webhooks: To sync subscription status and customer tier information in your SaaS, use Stripe webhooks. There are three basic webhooks that you should listen to:

1️⃣ customer.subscription.created
2️⃣ customer.subscription.deleted
3️⃣ customer.subscription.updated

Gate Access to Features: If you want to restrict access to certain features based on the user's tier, store the following two data attributes:

👉 Subscription status: defines whether the subscriber is active, canceled, or still on freemium

👉 Subscription tier: stores the plan name of each subscriber

I hope you found this guide helpful. To read the full article on the SaaS freemium billing flow, check out this article: https://blog.billflow.io/how-to-build-a-saas-freemium-billing-flow-with-stripe/

Follow me on Twitter: https://twitter.com/shar_dara

posted to Icon for group Developers
Developers
on January 29, 2021
  1. 2

    This is great! We're in the middle of a stripe integration for our freemium saas, but trying to figure out how to integrate google analytics into Stripe Billing & Checkout. Seems like there are options via zapier but is there a native integration?

    1. 3

      Thank you @ajaypond
      Are you using Stripe Checkout? or did you build your own front-end?

      We have this feature using billflow.io embeddable billing pages for Stripe Billing. You can see the guide here: https://docs.billflow.io/developers/handling-embed-events#track-conversions-with-google-analytics

      1. 2

        We are using Stripe Checkout. This looks like it may do the trick. Will take a closer look but thank you!

        1. 1

          Sounds great! Let me know if you have any questions :)

  2. 1

    I'm a Billflow customer and I like it!!

    "It is recommended not to create the customer or subscription objects in your billing system until the account is upgraded. This is different in the case of the free-trial flow."

    Can I ask you why?

    1. 1

      I'm so happy that you like it @codingdata

      If you have a freemium acquisition strategy and a flat subscription pricing model, to keep your billing integration simple and easy, it's easier to not create a customer and subscription in Stripe until the customer is ready to pay. It is also easier in terms of the Stripe analytics dashboard to only reflect on the converted customers.

      In the case of the free trial, you must create the customer and subscription initially because Stripe can handle the free trial date expiration logic. You shouldn't reinvent the wheel.

      Of course, this advice is subjected to change based on the detailed requirements. I hope that was helpful :)

Trending on Indie Hackers
Why Most Startup Product Descriptions Fail (And How to Fix Yours) User Avatar 97 comments We just hit our first 35 users in week one of our beta User Avatar 43 comments From Ideas to a Content Factory: The Rise of SuperMaker AI User Avatar 27 comments AIgenerationtool — replacing hiring writers with 1 AI dashboard User Avatar 24 comments NanoBanana or Seedream4.0? Why Choose When You Can Have Both User Avatar 19 comments Why Early-Stage Founders Should Consider Skipping Prior Art Searches for Their Patent Applications User Avatar 18 comments