#usamarashad_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257325037073989756
đ Have more to share? Add details, code, screenshots, videos, etc. below.
ok. so I should pass the same phases but update the phase prices only. Correct?
isnt that the same thing what im doing ?
Can you share the request id where you're getting the error? Would need to look
there is no request ID generated. Line number 788 jumps to an error directly.
req_LrMKHoheFXLamt
Yeah so in that request, you're trying to change the price on previous phases that have already ended
You can't do that
That first phase you pass in ended on 6/14
And you're passing in a different price
ok. So I need to make a check for passed phases and not change them. What would be the parameter on which I can base my check on ? the start_date or the end_date or is there some other flag?
yep check the end_date
You can compare it to the current_phase: https://docs.stripe.com/api/subscription_schedules/object#subscription_schedule_object-current_phase
And I was slightly wrong above. You don't need to pass in past phases. You just need to pass in all current and future phases when you update a subscription schedule from: https://docs.stripe.com/billing/subscriptions/subscription-schedules#updating
But you can use same end_date check to find which ones are in the past
ok i will try checking th end_date and compare it with the current unix timestamp