#piyush_docs

1 messages ¡ Page 1 of 1 (latest)

upbeat fjordBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1425797602959560724

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

limpid storm
#

You'd need to set cancel_at_period_end in a separate update call

quaint abyss
#

since i have restricted PM types to card, and hence the charging being synchronous(mean update will return the status of the generated invoice), i can do after the invoice has been paid, right? just after receiving the pending update call's response.

vale frigate
#

Hi there, I'm going to step in for my colleague. Let me catch up

quaint abyss
#

sure, can you go through the conversation?

vale frigate
#

It seems like it would be simpler to set cancel_at_period_end: false before making the update

quaint abyss
#

then what if the payment fails(prorated invoice) for that upgrade?

vale frigate
#

That depends on what you want to happen, like marking the sub as cancelled again

#

But are you having a problem with calling cancel_at_period_end: false after upgrading the subscription?

quaint abyss
#

I mean if i am upgrading, then if its unsuccessful then no point of reverting the cancellation? Only it should happen after the payment has successful

vale frigate
#

Right. So would calling cancel_at_period_end: false after upgrading the subscription, and the payment succeeding work for you?

quaint abyss
#

yes, i want to revert only if payment succeed for upgrade and so I was asking should i do second update(for reverting the cancellation) after the first update's response(considering it will contain the prorated invoice's status), so if invoice is paid, i will revert the cancellation.

vale frigate
#

Yeah, sounds good

quaint abyss
#

is it guaranteed that charging will be synchronous for PM type card?

vale frigate