Solved

How to configure in-app purchase of non-consumable feature - entitlement or no?

  • 9 January 2024
  • 2 replies
  • 129 views

Badge +1

I am building a game app for iOS/Android where a user can purchase individual levels of the game or subscribe to have unlimited access to all. The levels are typically all priced the same so I currently only have 1 product created on the app store for iOS. Can I use that one product to entitle the correct level in the app for the user utilizing revenuecat or do I need to create a new product for each individual level?

Right now there are only about a dozen levels, but I expect to get to hundreds over the next 6 months. My plan was if I were to offer a premium tier of levels that cost more as an in-app purchase I would create a new product, but if all of the levels cost the same I was trying to save myself the hassle of creating a new product for each new level.

Is it possible to manage which level users should have access to based on a single product purchase? How would that work? I searched through documentation to try and figure this out myself, but if I missed some key documentation I’m an eager reader.

icon

Best answer by Ryan Glanz 11 January 2024, 17:48

View original

2 replies

Userlevel 3
Badge +8

Hi,

Happy to help here. Long-term, the most robust route is probably to make a unique product for every level. That will ensure if a user ever needs to restore a purchase, etc., they can get access to that exact product/level.

One way you could do this with a single IAP is to keep track of which levels a user has unlocked in your backend (i.e., your own form of entitlements). If you display a paywall for a specific level, and the user purchases, you can log that level as accessible to the user.

To verify the purchase, you can enable webhooks, wait for a webhook after a purchase, then call the GET /subscribers endpoint and look at the Non-Subscription object. Once you verify that it has the recent purchase, mark that level as verified in your database.

Whenever the user tries to go to a level, you can check their db entry and make sure that level has been paid for.

Again, this requires you do some building on your end and could have drawbacks compared to just making a product for each level.

Badge +1

Thanks so much for the help and advice!

Reply