Skip to main content

In the documentation for checking subscription status, it is said that for checking if a user has paid, we need to use the entitlement object like this:

if (Object.entries(customerInfo.entitlements.active).length) {
//user has access to some entitlement
}

However, this doesn’t work when a user has used a promo-code on Android. Instead we use:

if (Object.entries(customerInfo.activeSubscriptions).length) {
//user has access to some entitlement
}

Is that a correct way to check?

Hi @soscuisine,

You can use the customerInfo in whatever way works best for your app! In the documentation, we specifically show an example for checking if entitlements are active but if you’d prefer to check for active subscriptions, that should work as well.


Reply