#usamarashad_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/1262476917609861291
📝 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.
- usamarashad_best-practices, 6 days ago, 5 messages
You would need to update the subscription Schedule and pass a phase that hasn't already ended. You passed in phase[0] to the request you listed above, but that one has ended, so you have to apply updates to only phase[2] since phase[1] has also ended
so I extract the phase whose end_date hasn't been reached yet and just pass that back to the update function but with the updated price?
how will stripe know that I want to update that phase and not add a new one?
Yup
You pass the index of that phase instead of an index of a new phase that doesn't exist yet
Huh. I'm sorry but let's say that I want to pass the second phase. How will send that in this code ?
In other words , how do I send the 2nd element of the map and leave 0 and 1 ?
I think you just need to pass the same exact attributes that are already in the old phases, and just include something different for phase[2]
What occured to me just now is that perhaps I need to send all the phases back as obtained from the subscription retrieve function. But before sending it back I modify the one that has'nt started
Exactly
Must be! Alright, happy to help! Best of luck