#xandert.93
1 messages ยท Page 1 of 1 (latest)
Hi ๐
I'm using webhooks for the first time and for some reason, I'm getting a particular event running twice and calling the webhook twice as a result. Can anyone offer any assistance?
quoting here
Oh thank you ๐
Webhook events from Stripe are triggered by actions related to your account. What event is firing twice?
It's product.updated
If I update a product on Stripe dashboard, two separate requests are sent to the webhook
1 second apart
Yes that is just how the Dashboard saves products.
The first .updated event represents the values you charged.
The second .updated event is Stripe setting the product.updated timestamp to reflect when you last changed the product.
Ahh I see
Thank you that makes more sense!
Is this mentioned in the documentation?
We don't explicitly call it out. However, you can see why each .updated event fired by examining the payload and specifically looking at the previous_attributes property. This will list that the values you changed were before the change.
Yes I did notice that change actually
I just didn't understand...well
Inspecting them now, the previous_attributes.updated path changes in the first product.updated event as well as the second
Yes I'm seeing that in my test events as well.
Is this expected behaviour?
I'm checking with a few colleagues on this
Haha thanks. I'm integrating Stripe into my own database and just don't want to have the webhook called twice when once is, in theory, enough
Yes this is not ideal. I am going to file a bug report internally and hopefully get this addressed.
For now though, unless you are doing a lot of Product updates it probably won't seriously impact your integration.
This is appreciated! I've spent the last couple of hours trying to work out why this was happening! Is there any way I could be notified when it is addressed?
And do you think that Stripe should be applying my own changes as well as their timestamp update in a single event?
You can write in to https://support.stripe.com and mention my screenname. I'll get it assigned to track the ticket.
RUN_BILLX-4732
Thanks!
Great. You should get updates as this is worked on
Ha they're saying the ticket ID should be a number and that they don't use screen names ๐
Try just sending an email instead of talking via the chat. And do mention Snufkin.