Skip to main content

Hi,

I would like to implement a 24 hour “full access/no ads” acess to my App. It should be a one time purchase for the user and automatically expires after 24 hours. I see only the possibility to implement this with consumables.

How I would realise it:

  • I would create an own Entitlement for those consumables
  • My app would check all transactions for this Entitlement and consider the entitlement as active if one of the purchases has been done max 24 hours ago

Caveats I see:

  • Revenue cat would consume the product directly after purchase. And then the entitlement stays active forever. Not a problem. But not really beautiful

What do you think of this idea? Are there more caveats or problems you see? A better idea?

Hi,

What you could do here is create a consumable for this but instead of attaching an entitlement to it, you can listen to the purchase webhook for it and grant a 24 hour entitlement via our granted entitlements. This will have the entitlement expire after 24 hours so you do not need to worry about it staying active forever like it will with your suggested approach.


That`s as good idea, too. Thank you!

I already implemented it:

  • I created an own entitlement for the 24 hours
  • I check latest purchase for the entitlement
  • If it is less than 24 hours ago I grant access. And prevent user from buying it again

But I think your idea is better in most cases:

  • It does not need another check to grant access. If entitlement is active, access is granted
  • If I would like to implement 12 hour or 48 hour access, I would just have to add another product.

Disadvantage could be

  • I need to know the identifier for every product in my code, to manually add the correct expiration time for the entitlement. Any idea for that? Would be great to be able to add meta data to products in Revenue cat be able to set “hours_valid”: 24 for a Revenue cat product or something like that. Tags? Maybe there are more idea.
     

Reply