#pravasok-subscription-update

1 messages ยท Page 1 of 1 (latest)

swift hedgeBOT
dire ibex
#

Hello

midnight osprey
#

Shouldn't there be a webhook event for changing subscribtions?

dire ibex
#

Can you provide the request ID for the error that you see when you downgrade?

dire ibex
midnight osprey
tepid junco
#

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

dire ibex
#

@midnight osprey and @tepid junco do y'all work together and these questions are about the same thing?

tepid junco
#

req_KAeXHMKiyas00q

dire ibex
#

Otherwise better to break into two different threads

tepid junco
#

no we don't work together

dire ibex
#

Thanks for clarifying

dire ibex
#

@midnight osprey let's discuss your questions in your own thread

tepid junco
#

@dire ibex you can check the request id req_KAeXHMKiyas00q

dire ibex
#

Yep looking at that request

#

Give me a min

tepid junco
#

sure Bismark, thanks a lot for helping us on this

#

we are forever grateful

dire ibex
#

Okay so you are trying to remove a paid item and immediately charge the customer for the remaining items, correct?

swift hedgeBOT
tepid junco
#

yes you are right

dire ibex
#

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?

tepid junco
#

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

dire ibex
#

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

tepid junco
#

sure @dire ibex

rapid warren
#

Hi ๐Ÿ‘‹

There is a lot going on in this thread. Give me a sec to catch up.

tepid junco
#

sure @rapid warren please take your time

#

@rapid warren there ?

rapid warren
tepid junco
#

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 ?

rapid warren
#

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.

tepid junco
#

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

rapid warren
#

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.

tepid junco
#

thanks

rapid warren
#

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

tepid junco
#

got it, so we don't have to wait for webhook is it ?

#

for the delete item request ?

rapid warren
#

Correct. The API will respond with a 200 if your request is successful or error with a 400 if not

tepid junco
#

Awesome Thanks @rapid warren you saved us the day

rapid warren
#

Great ๐ŸŽ‰ I'm happy to help ๐Ÿ™‚