Skip to main content
Question

Webhook delay caused subscription status bug – first event delayed by 6+ hours


Forum|alt.badge.img

Context:

I'm currently using my own backend as the source of truth for subscription status. This is necessary since we have users who don’t go through the standard payment flow.

While debugging an issue, I noticed the following behavior in the Customer History (see attached screenshot, customerId: user_01jtg9rmtwe6x8g96v43bcn2z3):

  • A trial started event for pulso_suscripcion:pulso-anual occurred at 2025-05-05 01:29 PM UTC.

  • However, the first time this webhook was delivered to my API was at 2025-05-05 07:49 PM UTC.

  • This 6+ hour delay was the first attempt at delivery (not a retry), which likely caused a bug in my system logic (the user was able to subscribe again, so an expiration event then revoked its entitlement from my backend).

Another point: I explicitly do not want Platform Server Notifications, as those were sending events tied to anonymous IDs. (https://community.revenuecat.com/sdks-51/after-purchase-new-alias-app-user-id-created-6098?tid=6098&fid=51https://www.revenuecat.com/docs/platform-resources/server-notifications/apple-server-notifications#user-identity)

Any recommendations to help me mitigate this delay? Maybe relying on the RevenueCat SDK if the subscription status from my backend is null?

 

 

This post has been closed for comments

3 replies

wes_clark
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 309 replies
  • May 8, 2025

Hi! I took a look at the server logs on our end and there was indeed a delay by the device in sending the receipt to us, which was most likely the result of network issues. Since you do not want to use the server notifications option to track new purchases, using the SDK when your backend’s response is null would be a good strategy. Additionally, you could also prompt your users to restore purchases if your backend returns null as this will force the receipt with their transactions to be sent to RevenueCat. 


Forum|alt.badge.img
  • Author
  • New Member
  • 1 reply
  • May 19, 2025

Great!

1- Do I need to prompt my users to restore purchases? Is there no way to do it programmatically?

2- Does forcing the receipt with their transactions to be sent to RevenueCat imply that the webhook will also be forced to be sent to my API if it hasn't arrived yet? or what does it mean?


wes_clark
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 309 replies
  • May 21, 2025

In terms of your first question, We recommend that you provide a button for them to restore purchases as calling restore purchases programmatically can cause issues. However, if you would like to use a programmatic method, I would recommend using our syncPurchases method. The method is quite similar, but instead of forcing the device to fetch the receipt from the store, it just uses the receipt that is already on the device itself. This sync method is usually used for a client-side import, but you could also use it in this case as well. 

In terms of your second question, yes, the webhook events would still be created once the receipt was received by RevenueCat like normal.  


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings