#yogeshinvideo
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- yogeshinvideo, 3 days ago, 24 messages
Hi 👋 this is possible, since we rely on the internet in general to deliver those webhook events, your code should not be expecting them to be received in a specific order because they could get out of order during transit.
Your flow should be structed in such a way that it won't crash if Events are received out of order. You could create a sort of queuing system that holds Events which it can't process until another Event is handled first. Or try to remove that dependency from your flow.
Hmm got it. So there is nothing in Webhook details on which we can rely on.
I'll check with the team for this. Thanks for the help.
Hey just one more question, Is created also inserted during transit?
No, created aligns with when the object was created (either the Event object or the object contained inside of data.object), it does not relate to the transmission of Events to webhook endpoints.
so the succeeded object got created before payment created, How does Stripe handle this internally?
Can you share the IDs of the specific Events you're looking at?
Sure,
payment_intent.succeeded- evt_3OAuY6B70smKt9XG0CCEAxmd
payment_intent.created - evt_3OAuY6B70smKt9XG00zxPodz
there is a 1 sec difference between them
Oh I see, this was for a Subscription, so there was a lot of stuff happening at one time. We're the ones generating the Events rather than consuming them, so I doubt that makes a difference to us. In general though, I wouldn't recommend indexing too heavily on the created timestamp of an Event.
Understood, well then we've to think of some other way to handle sequences.