#edevilliers_error

1 messages ¡ Page 1 of 1 (latest)

maiden spruceBOT
#

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

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

smoky parcel
#

Can you share the request id

#

Ok I found it actually

#

Looking

ancient apex
#

req_6e81zeZWAKdGpd

smoky parcel
#

So I think the issue is you need to pass the backdated start date as the start date

#

Actually wait that doesn't seem right

#

The schedule does have 1751986946 as the phases start date on creation

#

Oh

ancient apex
#

Yea I just noticed looking at the request in stripe the start date shown there doesnt line up with what Im logging

smoky parcel
#

In req_6e81zeZWAKdGpd you passed 1736481600 for the end date which is earlier than the start date

#

end date needs to be later

ancient apex
#

There is somehow a discrepancy in what my script is logging and what stripe is showing

smoky parcel
#

I see a bunch of different update attempts

#

So it's likely a different request

#

But anyway you can't set a different start date for the first phase

#

It already started

#

So you must pass 1751986946

ancient apex
#

Im not getting that number as the start date from the phase itself though

#

Oh wait

#

My logging is happening too early

#

Thats probably whats throwing me off

#

Ok yea now that I fixed that logging issue Im seeing the same thing as the request. Im confused on whats happening here in stripe though. I created the subscription schedule using the code in this SC. Am I wrong to expect this to set the start date of the first phase as the backdated start date of the subscription being used to create the schedule?

smoky parcel
#

Yeah so the subscription schedule's start date is when the schedule started

#

Not the backdated date

ancient apex
#

So that is the expected behaviour of creating a subscription schedule using from_subscription?

smoky parcel
#

Yes

#

If you retrieve the subscription, it'll still have the backdated start date

#

But the schedule's start date is the date you started the schedule

ancient apex
#

Ok makes sense. So essentially whats happening is that because the date provided for the new billing cycle anchor is in the past, its leading to this error since the start date > end date of the first phase when I try to modify the first phase to end on the new billing cycle anchor date

smoky parcel
#

yes exactly

ancient apex
#

Ok makes sense, thanks for the help!