Question

Webhook Duration

  • 23 April 2024
  • 1 reply
  • 18 views

Badge

Hi,

We have a back-end protecting routes based on the subscription status of the user. If user has a subscription, middleware allows to access. To ensure it, after purchase or any other transaction, Revenuecat sends webhook to our server and we are comparing the expiration dates and change the subscription status of user on our server by sending Revenuecat rest api.

However, in the initial subscription, if user make purchases and tries to see premium routes immediately in which webhook doesn’t recieve to our server; user may not see the premium content. In this case i have two questions:

  • Revenuecat paywall waits webhook to be sent to be closed? If paywall waits for sending webhook to be closed, no problem.
  • If not, should we make a control on our server by sending request to Revenuecat rest api when the paywall result is purchased?

What should our approach be? We know that we mention about very small milliseconds but we have to consider each possibility that may affect the user experience.

 

Thanks in advance

Best


This post has been closed for comments

1 reply

Userlevel 3
Badge +8

Hi,

  • Revenuecat paywall waits webhook to be sent to be closed? If paywall waits for sending webhook to be closed, no problem.

No, we do not wait for a webhook to be sent before closing the paywall.

You can get the (updated) customerInfo object from the paywall completion (see this example for how to get it) and check that the entitlement is active. Alternatively, you could call our API to check the user’s status as well (we’ll just return that customerInfo object).