#beadle_unexpected
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/1380203616476074114
๐ 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.
- beadle_api, 6 days ago, 42 messages
Can you please share an example subscription/schedule ID I can look at to see the events?
or the event ID
and what would you expect to be different in the payload of the event, compared to what you received?
Sure
Here is the subscription id.
sub_1RWfH0FfwZHCUIoudl0QmUao
I would have expected the current_phase value to have advanced but it sends a "stale" version of the subscription_schedule object.
(still looking at this, bear with me)
Sure thing. Thanks!
๐ stepping in to help here. Can you provide the exact Event you are looking at here?
Sure. One second.
Thanks
Okay looking at that
Okay so that Event was fired due to the test clock being added via: https://dashboard.stripe.com/test/logs/req_Vti23TtFCcd7rK but then there is another Event fired afterward when you actually advance time that updates the phases: https://dashboard.stripe.com/test/events/evt_1RWfJOFfwZHCUIoui7u2noWh
So really you want to just ignore that initial Event that fires due to the test clock creation
Ok, so the creating of the test_clock itself creates a subscription_schedule.updated webhook event?
Yeah
The updated Events fire anytime anything on the Sub Schedule object changes which is why it triggers that Event when creating the Test Clock
That makes sense. Maybe I'm not getting the webhook after that fires after that one. Let me reproduce it one more time and get you the event ids in order that they happen.
Just a few more minutes.
Ok, in order I get three webhooks related to subscription schedules:
- evt_1RWgPQFfwZHCUIouWBClVjq8 --> Creating the schdule
- evt_1RWgPQFfwZHCUIouufzRzBJX --> Schedule gets updated right after creation
- evt_1RWgQCFfwZHCUIouQrBGpz0U --> Update webhook that fires after I advance the time due to adding a test clock
I never get another susbcription_schedule.updated webhook eventhough the phase has changed due to the test clock.
Looking
https://dashboard.stripe.com/test/events/evt_1RWgQFFfwZHCUIoutffc7p3r is the Event you are missing in that list which is from advancing time
So it exists and I can see on my end that it was sent to your Webhook and your endpoint responded with a 200.
Ah sorry
You are right it is a customer.subscription.updated
Not subscription_schedule.updated
But, I think that is still expected here.... the Subscription Schedule object doesn't update in this case.
Maybe that is the confusion here to begin with?
The Schedule object itself doesn't mutate when you advance time.
Only the underlying Subscription
It should though. the scheudle.current_phase should change if the advancing of time crosses phase boundaries.
Correct.
Hrmmm okay let me look for another min
Ah darn okay I do see an open feedback ticket internally for this
Which states this is expected behavior (but has led to a lot of confusion)
Okay and there has essentially been a conclusion that this is a bug that it doesn't fire here.
But a fix hasn't been prioritized yet.
Is it just a bug when using a test cock?
So I'll revive this issue internally
If it is, I can work around it.
No it is not related to the Test Clock.
Ahh, shoot.
Yeah ๐ฆ
Getting a webhook to let me know my schedule has moved to the next phase is pretty important ๐
For sure. I'm thinking about workarounds but I'm also going to push internally for this to be fixed.
Unfortunately won't be able to guarantee any sort of timeline for that fix though...
I understand.
What are you using Phases for exactly? Will customer.subscription.updated reliably fire when your phase changes?
Yeah that would be the easiest solve -- to then just retrieve the Schedule.
If upgrade/downgrade then yes the customer.subscription.updated Event will also fire.
What information from the Schedule itself are you relying on?
Mostly just wondering if you can solely rely on customer.subscription.updated here in general without needing to worry about subscription_schedule.updated
I mean, if customer.subscription.updated fires every time an associated schedule chagnes then I can definitely rely on that.
That would depend on your implementation -- if you are updating the Price or quantity between phases then customer.subscription.updated will fire.
We are always changing a price or quantity when we create a schedule. I'm either adding a price, removing a price, or changing the quantity,
Going to give it a try real quick. ๐ค๐ผ
That worked!
Yay!
Thanks so much for your help. I was sure I was just doing something wrong but glad to know it wasn't me at least. ๐
Happy to help and sorry for the confusion!
I've flagged this issue internally again and will continue to push on it.
Thanks. Can I get notified when/if it gets fixed?
You would need to write into our Support team via https://support.stripe.com/contact/login and they would keep you updated over email for that.
Oh ok, last time I encountered something not working as expected I got one of these. Is this time different?
Hello @beadle, we have sent you a direct message, please check it at โ StripeBotโ ,
๐The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
Yeah this is different because this is a previously reported bug that is currently in the backlog. Those tickets are for deeper investigations.