#Gorv - Idempotency in Webhooks

1 messages · Page 1 of 1 (latest)

drowsy talon
#

Hello! No, it's not a bug, that particular event wasn't created by an API request, so there is no idempotency key.

fair valve
#

I received that event from Stripe after finishing a checkout session.

drowsy talon
#

That makes sense. The Subscription was created by Checkout, not by you via the API, so there's no API request or idempotency key in the event.

fair valve
#

ohh I didn't know that. so in that case how would I handle if multiple requests gets fired from Stripe for same event or is it not the case here?

#

somewhere in stripe docs, it's mentioned that same event can be called multiple times in your webhook so need to take care of that by idempotent key.

drowsy talon
#

That doesn't refer to the idempotency_key, it's just talking about the general concept of idempotency.

#

You should use the event's ID (like evt_123) to determine if it's an event you've already processed or not.

fair valve
#

that should do. Thanks Rubeus for prompt response.

drowsy talon
#

Happy to help!