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:
- How do I change/overwrite the entitlement of a customer?
- What is the best practice to reliably check the users entitlement in the own database?
Thanks in advance!