#john-l_best-practices
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/1349490476855726141
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there!
I think what you're looking for is the invoice.upcoming event: https://docs.stripe.com/api/events/types#event_types-invoice.upcoming
I thought I read somewhere that invoice.upcoming doesn't trigger when a sub schedule changes phases
we have our account set to trigger the event 3 days prior to renewal but I don't think this is considered a renewal
Sorry for the delay here - server is really busy at the moment
invoice.upcoming will fire when a Subscription is going to generate an Invoice, which is a separate thing than a Schedule changing phases
Do you have an example of a Subscription/Invoice where you were expecting the event to fire and it didn't?
Looks like it! I've been experiencing that throughout the day
Also on point #2 - that isn't necessary and you don't need to do anything; the Schedule ends when . . . well, when it ends ๐
if it's an annual plan though wouldn't it just stick around?
is this helpful: clock_1R1uoq2hqajdreQx5oTsJWbn
i tested a sub with that clock, forwarded it a month + 1 day to see what events I would receive
do you have the Subscription from that test clock? The relationships between the objects are such that its difficult to get from the clock to the Subscription
sub_1R1umx2hqajdreQx5hIjmGpd
sorry i thought it would all be connected
I see this event: evt_1R1up92hqajdreQxNOXIA1EI that indicates an upcoming payment in 31 days
That's right, and the interval for the first phase is a montly price
What were you expecting instead?
Well that event is for the 2nd month , so I've already been charged the $19 for the first month, I advanced to month 2 and was charged $74, so my understanding is that notice is actually a notice for month
3
If I look at the date on that event it's 1744485479 = April 12
so I don't see where I'm given prior notice of the $74 charge , the event just prior to that is the $19 charge succeeding
I see
i'm going to advance one more month
This seems odd and I'm looking into how these events work with test clocks
okay -- I do see the schedule get released
I'm actually not testing an annual plan right now but that explains a little bit.. it makes me think thought that the schedule will stick around for a year
I think what you're seeing around the date/time the invoice.upcoming event is sent might be a wrinkle of working with test clocks
๐ okay this is my first time using them, but also sub schedules
Well I'll have to come back to this -- I think i'm going to plan to tirgger the email myself until I can better confrim this
Sure thing
We track it on our end when a user creates a new question within a certain span of time - at least a few weeks