#beadle_unexpected

1 messages ยท Page 1 of 1 (latest)

modest badgerBOT
#

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

untold furnace
#

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?

feral tide
#

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.

untold furnace
#

(still looking at this, bear with me)

feral tide
#

Sure thing. Thanks!

modest badgerBOT
plush sorrel
#

๐Ÿ‘‹ stepping in to help here. Can you provide the exact Event you are looking at here?

feral tide
#

Sure. One second.

plush sorrel
#

Thanks

#

Okay looking at that

#

So really you want to just ignore that initial Event that fires due to the test clock creation

feral tide
#

Ok, so the creating of the test_clock itself creates a subscription_schedule.updated webhook event?

plush sorrel
#

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

feral tide
#

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:

  1. evt_1RWgPQFfwZHCUIouWBClVjq8 --> Creating the schdule
  2. evt_1RWgPQFfwZHCUIouufzRzBJX --> Schedule gets updated right after creation
  3. 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.

plush sorrel
#

Looking

#

So it exists and I can see on my end that it was sent to your Webhook and your endpoint responded with a 200.

feral tide
#

what is the type on that event?

#

guess i could clik the link lol

plush sorrel
#

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

feral tide
#

It should though. the scheudle.current_phase should change if the advancing of time crosses phase boundaries.

plush sorrel
#

Ah

#

The start/end date of current_phase

feral tide
#

Correct.

plush sorrel
#

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.

feral tide
#

Is it just a bug when using a test cock?

plush sorrel
#

So I'll revive this issue internally

feral tide
#

If it is, I can work around it.

plush sorrel
#

No it is not related to the Test Clock.

feral tide
#

Ahh, shoot.

plush sorrel
#

Yeah ๐Ÿ˜ฆ

feral tide
#

Getting a webhook to let me know my schedule has moved to the next phase is pretty important ๐Ÿ™ˆ

plush sorrel
#

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...

feral tide
#

I understand.

plush sorrel
#

What are you using Phases for exactly? Will customer.subscription.updated reliably fire when your phase changes?

feral tide
#

I was just wondering that myself.

#

Upgrade/downgrade of a subscription.

plush sorrel
#

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

feral tide
#

I mean, if customer.subscription.updated fires every time an associated schedule chagnes then I can definitely rely on that.

plush sorrel
#

That would depend on your implementation -- if you are updating the Price or quantity between phases then customer.subscription.updated will fire.

feral tide
#

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!

plush sorrel
#

Yay!

feral tide
#

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. ๐Ÿ˜‚

plush sorrel
#

Happy to help and sorry for the confusion!

#

I've flagged this issue internally again and will continue to push on it.

feral tide
#

Thanks. Can I get notified when/if it gets fixed?

plush sorrel
feral tide
#

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.

plush sorrel
#

Yeah this is different because this is a previously reported bug that is currently in the backlog. Those tickets are for deeper investigations.