Subscribe user to a plan stripe action in backened

Hello fellow bubblers

i need a help with a scenario where i have a user subscribed to a monthly plan in stripe. when he tries to change the subscription to the yearly plan or visa versa i want them to change it only when the current subscription period ends.

so i am assuming to set up a webhook customer.subscription.deleted when this webhook hits and user want to upgrade or downgrade subscription i will call the stripe plugin action “subscribe user to the plan”. which has payment_behaviour. if i keep error if incomplete it does not create a subscription.

so i need a help with it. what should be the ideal workflow to manage it and how to manage payment while user is offline and it create a subscription when the period ends automatically while user is offline.

thank you :slight_smile:

A webhook is essentially an API call to Bubble. It’s like poking Bubble to wake up and do something whenever it occurs.

And here’s a tutorial: How to connect Stripe webhooks to your Bubble application - YouTube

i have configured all the necessary webhooks…all i want to know what should be the ideal payment_Behaviour for offline users when they are being subscribed to the product in backend.

You just create a simple workflow. When that endpoint is called, subscribe the user with that stripe ID to the plan and set their subscription status to active. It doesn’t make a different whether they’re online or not.

This topic was automatically closed after 70 days. New replies are no longer allowed.