#usama_schedule-phases

1 messages ยท Page 1 of 1 (latest)

grim sorrelBOT
hollow grailBOT
#

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.

grim sorrelBOT
#

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

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

left falcon
#

FYI. This same retrieve function was getting all the 4 phases up until yesterday. I know its a long shot but perhaps stripe made an update?

grim sorrelBOT
sinful crest
#

usama_schedule-phases

#

@left falcon I'd recommend reaching out to our support team for more details https://support.stripe.com/contact/email
I know we were rolling out a change that removed past phases but I don't know much more about this

left falcon
#

Ok. Is there a way I can reach out to someone specific by name? I think it will get more attention since I need an exact workaround ASAP. We have a critical app to launch and it was running fine just until yesterday.

sinful crest
#

@left falcon it's not really "critical" if it hasn't launched yet right?
also your app should basically never need archived/past phases so what is the critical issue here?

left falcon
#

it was going to launch and now we have to pause. Well we do need the past phases since we have some accounting requirements.

sinful crest
#

What do you call "accounting requirements" exactly? we don't make guarantees on past phases being returned in the API so I'd recommend adapting to that fact and not relying on their existence

left falcon
#

We need to know what amounts were charged per month since they can vary by each month.

sinful crest
#

You should cache this in your own database, don't rely on historical phases being in your API. Or look at historical Invoices

left falcon
#

Secondly I checked the documentation for sub schedules it does not say that past phases may not be there. Where should I be looking for this info?

sinful crest
#

That's my advice at least, to focus on reworking your code to not rely on past phases being guaranteed to be there. Updates to a SubscriptionSchedule can clear past phases from the API for example

left falcon
#

Ok I will need a workaround in this case. Should I get invoices via stripe.invoices.list(subscriptionID) and then get the the future phases and do a "merge" so to speak to get all the phases? Any better way of doing it ?

sinful crest
#

If it were me I would store my own representation of phases in my own database.

left falcon
#

For future instances I will go with your advice. But for past data which I was relying on stripe for, what shall I do ?

sinful crest
#

I would use the List Invoices API and the reconstruct the information from there. There isn't really a way to get the exact phases unfortunately

left falcon
#

Hey one more question. Are the price objects always gauranteed to be stored ? Regardless of when they were created Or if they were in the past?

sinful crest
#

yes

left falcon
#

GREAT! I just noticed that the invoice response has deep down hidden inside it the priceID. I can get all price IDs from paid invoices and merge them with the priceIDs of the phases which I can see. One of them will be duplicated since this phase will not yet be in the past and its invoice will be already generated. Sounds like a plan

sinful crest
#

๐Ÿ‘

#

I also worked with the product team in parallel and they are confident nothing has changed in months on that API and your account didn't have access to past phases yesterday or a week ago

left falcon
#

Ok. On my end I have only retrieved subscription schedules and prices to get the amounts charged. Thats strange on stripe dashboard I can see 3 upcoming phases and 1 past phase for this schedule ID "sub_sched_1PD7GKDVf1B7CjYuTMLGw24m". Why dont I see the past phase then ?

sinful crest
#

We don't guarantee past phases in the API though. You were adamant this 100% worked yesterday on the same code/same SubscriptionSchedule and I don't think that's the case.

left falcon
#

ok i will check my code again. If nothing has changed since yesterday or the week before then it must be something on my end.

sinful crest
#

๐Ÿ‘

#

but ultimately you got lucky to hit this now since it could have happened weeks later in production which would have surprised you!

grim sorrelBOT