Skip to main content

Hi,

as I need the package name / state in my own backend for some calculations I’m using webhooks.

For now I’ve just used the entitlement ids property, and the first value of that array. 

While doing some testing I granted a new entitlement to the user and now he has two. Which does not work with my solution. I wanted to change his entitlement not add another one.

And now I’m concerned that this might not be the best way to solve this. What if (for some reason) there are two entitlement ids?

 

So there are two questions:

  1. How do I change/overwrite the entitlement of a customer? 
  2. What is the best practice to reliably check the users entitlement in the own database?

Thanks in advance!

 

Hi ​@Lams,

A user’s entitlement can only be removed if it was granted via RevenueCat to begin with, then you could revoke it via the dashboard or the API. Otherwise, if the user gained access to the entitlement via a subscription purchase, there wouldn’t be a way to change it or overwrite it without changing the entitlement that is attached to the product itself, which could have other implications as well with other users. 

If you have multiple entitlements available, it’s possible that a user may have more than one active at a time, so you’ll want to be able to account for this in your database without overwriting the first.


Reply