#acaiafa
1 messages · Page 1 of 1 (latest)
Could you please share the event ID?
evt_1NcQBeHCz55fQd97ThbDhMX5
I don't actually know what these are. How are you expecting to use it?
in the document itself it says that these bodies are used to validate the duplicity of events. I would use it for that.
https://stripe.com/docs/api/events/object#event_object-request-idempotency_key
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This request was automatic so there's no request nor idempotency key.
So the webhooks don't have this information? I don't need to validate duplicity of events with webhooks or in this case do I validate with the event id itself?
Yes, the event ID will do. But it's best if the webhook handler is idempotent on it's own, without checking for IDs.
Anyway, the idempotency_key that you're referring to is not for the webhook notification, but for the request that produced it.
But how could the event handler be without validating the event id?
It depends what operations you perform on the incoming data. For example, if you set your order status to "paid", you can make sure you can't set it to that state twice. But it of course depends on your situation.
But event ID is a good check
Thank you for your help
Happy to help!