Question

Entitlement isActive is false after opting out of renewal, while it should be true

  • 4 January 2024
  • 2 replies
  • 55 views

Badge +4

One of our customers opted out of automatic renewal. She subscribed previously to a yearly subscription, and after a couple of days opted out of renewal. This means her entitlement to that yearly subscription should still be active, just the `willRenew` property of the entitlement should be false. However, the `isActive` property of the entitlement was false.

 

Only after asking her to restore her purchases, the entitlement was isAcgive again.

 

Code for checking if subscribed:

Purchases.shared.getCustomerInfo { (customerInfo, error) in
if let customerInfo = customerInfo {
if let entitlement = customerInfo.entitlements[PurchasesManager.entitlementPremium] {
if (!entitlement.isActive) {
// Not subscribed, but was subscribed?
if (premium.premiumFromAppStore) {
// Logic for ubsubscribing user and informing they're unsubscribed
}
}
}
}
}

 

Code for restoring purchases:

func restorePurchase() {
self.showLoaderPurchase = true
PurchasesManager.shared.restorePurchases { customerInfo, error, configured in
self.showLoaderPurchase = false
if (configured) {
if let error = error {
self.showToast("Error occured during restoring: \(error)")
} else {
let hasPremium = customerInfo?.entitlements[PurchasesManager.entitlementPremium]?.isActive ?? false
self.premium?.premiumFromAppStore = hasPremium
self.showToast(hasPremium ? "Congratulations. Successfully restored your Premium subscription" : "There are no Premium subscriptions to restore for your account")
}
} else {
self.showToast("Environment is not set up correctly. Please contact support")
}
}
}

 

Is this a bug with RevenueCat or App Store, or am I maybe missing something obvious here?


2 replies

Userlevel 4
Badge +6

Hi @JornTheWhiteUnicorn,

Was your user able to access their content during this time when the entitlement was not listed as active? Without more information, it seems like something may have occurred on the user’s end to cause their subscription status to not be synced with our servers, such as reinstalling the app or using a different device. In this use case, having the user restore purchases was the correct course of action, and it sounds like it worked. I don’t think you’re missing anything here, but if you’d like to look into this further with us, I’d probably recommend opening up a support ticket and sharing the app user id here: https://app.revenuecat.com/settings/support

Badge +4

Thanks Kaitlin! It is very unlikely that it was an app re-install (either on the same phone or a new one), since our Mixpanel onboarding events would show that for this user, and there are no events indicating that. 

Also, strangely enough the purchase history data that was there for this user is now gone.

I’ve written in with a support ticket, thanks for your help!

Reply