#xerusky_subscription-upgrade

1 messages ยท Page 1 of 1 (latest)

hollow zenithBOT
#

๐Ÿ‘‹ 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/1427795092843790478

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

chilly fox
#

xerusky_subscription-upgrade

ruby phoenix
#

I send the code that i am using, but it fails in Invoice invoice = stripeClient.invoices().retrieve(invoiceId);
Failed to update subscription with proration: No such invoice: 'in_1SIGxV2e959zAvZlFooxORsr'; code: resource_missing; request-id: req_bAVgoYyqXc2z5H

chilly fox
#

Hello! It's impossible to use Checkout to modify an existing Subscription. Checkout can only be used to create brand new Subscriptions and taking the first payment

#

Happy to look at the code but I think there's some high level misunderstanding we need to clear up first

ruby phoenix
#

ok i only need a direction on how to solve my problem. Thank you for fast response. Let me explain

#

i want to add a new item representing another product to the active subscription without changing the active status.
And i also have to charge it before the user can have access to it. i read that PENDING_IF_INCOMPLETE would keep the item in a pending update side untill that is paid but i am having problems with that configuration.

chilly fox
#

so sorry I closed the tab by mistake ๐Ÿคฆโ€โ™‚๏ธ I was wondering why you weren't replying

ruby phoenix
#

haha just explained my problem. I do not know why is not working as it says

#

i want to add a new item representing another product to the active subscription without changing the active status.
And i also have to charge it before the user can have access to it. i read that PENDING_IF_INCOMPLETE would keep the item in a pending update side untill that is paid but i am having problems with that configuration.

#

oh man i have to change setProrationBehavior(SubscriptionUpdateParams.ProrationBehavior.CREATE_PRORATIONS) to always invoice , is that ?

chilly fox
#

yes

ruby phoenix
#

omg. Ok i will try that, thank you for your help

chilly fox
#

sure thing. Let me know if that doesn't work and I can have a quick look

ruby phoenix
#

excellent it worked like a charm

chilly fox
#

yay!

#

You should try with examples like a decline or 3DS being required to make sure you handle it well too