Dynamic Stripe Subscriptions

Hi,
My app is a marketplace that offers different subscriptions based on what a coach is offering. The subscription and price need to change dynamically based on what the user has decided to subscribe to. I have created different subscriptions in my Stripe account, the live account and keys are all linked. I can’t understand how to get the subscriptions to dynamically change based on what the user has selected. When I try to add data to a coach (created a subscription in my Stripe account) I can’t link that data into the coach profile.

Help!

1 Like

You will need to use Stripe Connect for this

Hi Simon I have stripe Connect. It’s bubble- I can see the plans when I set up “Subscribe the user to a plan” I just can’t figure out how to link a specific subscription from a coach’s profile to the checkout

It gets complicated because you need to create the customer as a customer of the connected account then subscribe them to one of the Coach’s subscriptions. The customer is not signing up to your subscriptions but those of the Coach.

Typically when I create the coach I also auto create the subscription products in their account.

Thanks Simon,
I understand that but when someone hits the checkout button (they’ve brought the plan they want to subscribe to from the previous page) and they click subscribe with stripe. How can I dynamically get that plan to carry data through?

If I can pay you for a call for help I will!

Hi Simon - how do you actually create the subscription? And then later, how do you allow users to subscribe?

Just Use the subscriptions API calls

Sorry you first create products and plans then subscripe users to them

Yeah - need to figure out how to modify things on behalf of a ‘seller’ I think I’ll just take the copilot course…

I do have that with differents price for each house : www.hackerhouse.paris

You can use different quantity with unit price at 1 : https://stripe.com/docs/billing/subscriptions/quantities

1 Like

Hi Simon - do you know how to create the products and plans automatically in bubble?

Yes,

It depends if you are using Connect or not and where you want to create the products & plans. If they are static and you are NOT using connect then you could manually create them in your stripe account. However, if you want the plans and products to exist in a connected account then you can create them using the API on behalf of that account.

You use the standard API calls but you have Stripe-Account in the header to tell it which connected account to create them in.

Simon

Here is an API call using the connector to create a plan in a connected account

Amazing, thank you! I will play with this today.

I was able to get this all to work! If anyone needs help, feel free to message me.

Hi @jakesing ,
I´m looking to create an office rental platform where users can book for x months the office and price depends on how many persons will get it. So I have a dynamic price and a dynamic duration for each booking.
How could I make this work?
Thanks

One way I can think of is to setup one product in Stripe, lets that is “Office Rental”. Stripe allows you to create multiple “prices” for a product. The way you can leverage this is to setup a new price for the same product every time the user is done creating the combo of services on your app. You would do this using API calls. Now if you need to setup a monthly subscription, you would need to create customer in stripe, capture their payment methods and setup the subscription on the new price that you created earlier. All of this is API driven and you are in luck because Stripe probably has the best API docs I have ever come across.

I hope this helps. Holler if you have more questions. Cheers!

Hi jakesing,
I’m trying to do dynamic subscription directly from my bubble page. What Simon said to you, I do. But every time I got an error massage from stripe : "“Missing required param: interval.”, “param”: “interval”,
But I defined “interval”:“month”
How can I solve this problem.