Skip to main content
All CollectionsWebhookFAQ
Do I need to check the subscription status every time I receive a webhook (an event through the webhook?) in case user actions were not taken following expected order (ex. purchase event arriving after a cancel)
Do I need to check the subscription status every time I receive a webhook (an event through the webhook?) in case user actions were not taken following expected order (ex. purchase event arriving after a cancel)

Tech / Webhooks / Backend

Jeff Grang avatar
Written by Jeff Grang
Updated over 2 years ago

Our webhooks are sent in order of creation for each user (we put a mutex on the user id to ensure this).

So even if the sending of an event did not work, the following ones would not be sent until the first one was validated by your backend.
​
If, despite this, events were to go out in the wrong order (from where?), we added an extra security layer by including the date of creation of the event in the event properties (field `received_at`) which enables you to order the received webhooks.
​
The best practice is to always keep the last received date associated with a specific pair of properties (`user.vendor_id`, `properties.product.plan.vendor_id`), and ignore any older event you could receive after this association was made.
​

Did this answer your question?