I’m trying to change a user’s plan using the “Update Subscription Item” action from Stripe, but I don’t have the “make plan name dynamic” option like I do under “Subscribe current user to a plan…”, I feel like it should definitely be here. Because of this, I have to make one conditional "Update subscription item to plan “plan1” ONLY WHEN thing’s plan is “plan1"” action for each plan I have.
Can we add the ability to make the plan name dynamic under “Update Subscription Item”?
Also, what’s the difference between “Update subscription item” and “Subscribe current user to a plan” with the “Update existing subscription” box checked? Trying to figure out which one to use so it doesn’t create a new subscription every time the user changes plans.
Thanks


1 Like
This works, thanks a lot for the quick turnaround! Helped me out a ton.
1 Like
@greg.nallie Greg can you Elaborate on the difference between “Update subscription item” and “Subscribe current user to a plan? I seem to be able to Create Subscription item but i’m having no luck working out Update and Delete subscription …i’ve read the docs but to no avail … I just keep getting Stripe error Invalid subscription_item id: sub_blah"
Yep, took me a while to figure out.
A subscription (Subscription ID) is a list of plans (Subscription Item ID).
When a subscription is created via “Subscribe current user to a plan”, a “Subscription ID” and “Subscription Item ID” are also created. A new subscription is created with its associated Subscription ID, and the plan is created under that subscription, with the plan’s unique subscription_item ID.
So if you want to add a new plan to a user’s existing subscription, you need to “Create a new subscription item” and designate the Subscription ID that you’re adding the plan to.
If you want to change the plan the user is on, use “Update subscription item”.
If you want to cancel one plan in a subscription of many plans, use “Remove subscription item”.
It seems that the workflow actions “Subscribe current user to a plan” and “Cancel the current user’s plan” could be a bit confusing, as you’re creating/cancelling entire subscriptions, not plans, unless I’m misunderstanding. From the Bubble Documentation:
“Cancel the current user’s plan
This action cancels a subscription with Stripe. The card will not be charged anymore.”
2 Likes
@greg.nallie Greg, thanks, really helpful and all sorted cheers. One further question whcih you may have encountered as you’ve setup subscriptions Stripe subscription plan upgrade or downgrade
I know this was some time ago, say for instance the subscription item was not available, such that there was an error and it wasn’t saved. Would you know of how to retrieve the subscription item id via api later on?
1 Like