#pravasok-subscription-update
1 messages ยท Page 1 of 1 (latest)
Hello
Shouldn't there be a webhook event for changing subscribtions?
Can you provide the request ID for the error that you see when you downgrade?
That is pretty vague but there is customer.subscription.updated that fires whenever a Subscription object's data changes, yes.
that should contian the new subscription ID right?
when the user goes from basic to free, its is deleting that item from subscription, not downgrading as free plan is handled by us and not stripe
as we are using pending updates feature for subscription change, we are not able to remove that item from subscription
Subscription IDs don't change. It sounds like you are instead creating a new Subscription?
@midnight osprey and @tepid junco do y'all work together and these questions are about the same thing?
req_KAeXHMKiyas00q
Otherwise better to break into two different threads
no we don't work together
Thanks for clarifying
Oh no I just hopped in
@midnight osprey let's discuss your questions in your own thread
@dire ibex you can check the request id req_KAeXHMKiyas00q
Okay so you are trying to remove a paid item and immediately charge the customer for the remaining items, correct?
yes you are right
Okay and you only want this downgrade to happen if that payment is successful? I'm a bit confused why you want to use pending_if_incomplete here?
because it has one item with upgrade and one item is being removed from subscripton
If i don't use pending_if_incomplete , if the payment fails, upgraded item will be in a mess
Ah it also is upgrading
Okay I need to step away but @rapid warren is going to take over and help figure out the best path forward
sure @dire ibex
Hi ๐
There is a lot going on in this thread. Give me a sec to catch up.
Yes I'm still looking. What I am seeing is that the delete parameter is not supported for the pending_if_incomplete payment behavior according to our docs: https://stripe.com/docs/billing/subscriptions/pending-updates-reference#supported-attributes
yah that is true, but we are a multi product saas, what if the customer wants to remove one product and upgrade another product. how to handle this ?
Well that would depend on whether you wanted to continue to use the pending_if_incomplete payment behavior.
If not, you could make all those changes in single API call. But if you wanted to keep using pending_if _incomplete then you would need to make deleting the first item a separate API call.
got it, but it needs 2 user action right, it essentially means asking user to delete one product and wait for the webhook update and then oly ask the user to update the another product ?
i want to ask the user to do it once, but is there way programatically to do without asking the user to do it twice
Your integration could trigger the delete action and, when that request completes, then trigger the upgrade. I see this request is coming from your NodeJS server so you can write the logic that would take these actions.
thanks
Sure thing! For the request that deletes the first subscription item, you would not need to wait for the webhook response. The API response will let you know if it was successful or not
Correct. The API will respond with a 200 if your request is successful or error with a 400 if not
Awesome Thanks @rapid warren you saved us the day
Great ๐ I'm happy to help ๐