Stripe Subscription Tip 1 - Switching Dev & Live Plan IDs

Headshot of Matt the Planet No Code Bubble Coach

Need 1 to 1 help?

Your no-code consultant & Bubble tutor.

In this Bubble tutorial we share a quick tip about switching from your Stripe Test Plan ID to your Stripe Live Plan ID.

This Bubble tutorial is a quick tip for when you're using Stripe as a payment gateway in your Bubble app. And you may have noticed that both your Bubble app and Stripe have both got a development version and a live version.

Switching Stripe Subscription Plan IDs

When you come to adding in the subscription, like I've got set up here, I've just got a button. I've added the subscribe user to a plan action. It can be a little bit confusing how you fill this in, especially because when you add your Stripe API details into the Stripe plugin, rather than the one built by Bubble, it will pull across the Stripe plan names from your Stripe test or development version because you are in and editing your Bubble test or development app.

Discover more Bubble tutorial videos

Now, before I show you this quick tip, if you find videos like this useful, we really appreciate a subscribe and a like. And if you're learning Bubble, there are even more videos available on our website. You can't find them on YouTube. They're only available to members on our website, loads and loads of hundreds of Bubble tutorials available for you to kickstart and accelerate your Bubble development journey now.

Isn't live version

But yeah, this is confusing. And so it can lead to your live Bubble app using your Stripe test plan ID, which means it's not going to work. So a quick solution to this is to simply say, make the plant dynamic and then use the isn't live version and then format as text. And so isn't Live, so if it isn'tLive, it's your Dev version, which means that in here, you would put whatever your plan ID from Stripe is for your Dev version. And in here, you would copy paste these rather than typing them in. You would put your plan ID to your live version. That way that when Bubble runs this workflow, whether it's in the dev version of your app or the live version of your app, it automatically, using this statement here, isn't live version, will insert the right plan ID based on whether you are testing it as a user in your development version or whether you are a live user, one of your real customers, they will be subscribed to a subscription plan in your Stripe Live section.

Now, hopefully that is useful because this is something which when I first came to it many years ago, trying to add in a Stripe subscription into my Bubble app, I just went round and round the circle trying to work out why it didn't work, how to get Dev data and live data separated. Anyway, really simple. Just use the isn'tLive statement, modifiers text, and insert your Dev one and your Live Stripe plan IDs in here.