Solved

Implementing non renewable purchase / managing entitlements

  • 21 October 2021
  • 1 reply
  • 48 views

Badge +2

I have an app working where we sell renewing subscriptions. 

 

I am trying to implement a new use case, we would be selling for some users a one time purchase that gives them access for 20 months. 

 

I was thinking about implementing it as a non consumable IAP, with an entitlement attached, so that when the user buys this product, they get access to the app. But I'd still have to remove the entitlement when the time is up.  I could do that in the backend, but I don't see a method in the API to remove an entitlement.  

How would you implement this? Is there a best practice to link an entitlement to a non consumable IAP with an arbitrary expiration date? 

icon

Best answer by sundeep 22 October 2021, 22:37

View original

1 reply

Userlevel 2
Badge +6

Hi @carlos,

Typically, non-consumables are used to permanently unlock content, which RevenueCat supports as-is. It sounds like you're describing something along the lines of a non-renewing subscription since you need it to expire after 20 months. For this, we’d recommend not attaching to an entitlement, because RevenueCat would treat it as a permanent entitlement since we don't receive an expiration date from Apple for these. You would need to set up your own system to handle expiration and granting/revoking access. You could get the purchase date from PurchaserInfo or our GET /subscribers endpoint and use that to determine whether the user has access.

You could also look into RevenueCat promotionals to see if it fits your use case: https://docs.revenuecat.com/docs/promotionals. Usually this is for free promotionals, but it does give the user access for a set amount of time and then expires. You could grant/revoke access to the entitlement through the API: https://docs.revenuecat.com/reference#grant-a-promotional-entitlement. The caveat would be that the duration you set can only go up to a year, not 20 months.

Reply