#yamith_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1333544019321688114
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- yamith_customer-portal-subscription-updates, 3 days ago, 263 messages
- yamith_api, 4 days ago, 6 messages
Hello
Yes, have you checked this? https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
Since you want to schedule this at the end of period, you can use Subscription Schedules API for that - https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#upgrading-subscriptions
No, I already have that programmed, but I had a subscription product. Since I couldn't downgrade at the end of the billing period from the customer portal, I had to put the prices on a single product. The thing is that those who have already purchased are left with the price ID that was before, and it is not for that same product. I would like to know how to update the prices of those customers who have already purchased
I am not sure I understand. Can you elaborate with an example or something?
Okay, for the subscription, I have a prod_id with a price_id, and there are four of them. Clients have already purchased those price_, but I had to create other price_ within a single prod_ to allow downgrades at the end of the billing period from the customer portal.
Since clients have already purchased subscriptions with those price_id that are not part of that prod_, they cannot downgrade at the end of the billing period.
So my question is if there is any way I can change the price_ids of customers who already purchased to the new price_ids
Subscriptions are really just linked to price_ids from an API perspective. The product associated doesn't matter when you're working with the APIs directly. It may matter with customer portal which is different...
In your case,
Customer A is subscribed to price_A which is for product_A and you want to move them price_B which is under product_B (which allows for downgrades)
What you need to do is update the subscription from price_A to price_B using the docs I shared here: #1333544019321688114 message
Once you do that, customers should be able to switch prices from Customer Portal
But I would have to do something massive for all the customers who have purchased
๐ Stepping in for my teammate
That's right, you'd have to update each Subscription to the new Price, though you should be able to do this programmatically/with a loop of some sort
Yes, that's why I'm here
Are you running into any issues trying to update these Subscriptions? I'm not able to write this code for you