#karan_api

1 messages ¡ Page 1 of 1 (latest)

harsh troutBOT
#

👋 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/1237763790318338100

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

shadow hound
#

Hello
So just to make sure I am on the same page, you're trying to update an existing subscription and handle proration when user upgrades or downgrades?

#

We have docs on how you can handle subscription updates: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade

The issue here is that you're creating a separate checkout session for this. You don't need to do that. You can directly update the existing subscription using update subscriptions API endpoint with the new price ID and handle proration accordingly.

#

that way, it won't create a new subscription for the updated price/product

clear onyx
#

You are correct on the use-case and we are on the same page.

I just checked the doc you linked here. So you recommend not creating a checkout session i.e. not taking the user to Stripe and handle this on our site itself when they try to downgrade/upgrade using Stripe update subscriptions API endpoint?

shadow hound
#

Correct

clear onyx
#

Got it. Thanks for the responses on here. Will do the same and reach back if any questions/concerns when I implement this.

Appreciate the prompt support here.