Hello,
I am working on integrating webhooks to store and update users' subscription statuses on our server.
As suggested in the official documentation (https://www.revenuecat.com/docs/integrations/webhooks#syncing-subscription-status), We’re implementing a system where our server listens to webhook events such as INITIATE_PURCHASE and RENEWAL.
Upon receiving these events, we call the RevenueCat V2 Subscriptions API to retrieve the latest subscription status stored in RevenueCat and update our server data accordingly.
However, in the case of the RENEWAL event, when we call the V2 Subscriptions API immediately after receiving the webhook event, the response often contains outdated information. It seems that we need to wait at least several seconds before calling the API to retrieve the latest data.
To synchronize subscription statuses in an idempotent and robust manner, I agree with the documentation’s suggestion to rely on REST API data rather than directly using the information from webhook events.
Could you provide guidance on how long we should wait after receiving a webhook event before calling the REST API to ensure accurate data retrieval?