Skip to main content
Question

How to validate purchases for consumables in a No-Account setup?

  • December 15, 2024
  • 3 replies
  • 42 views

Forum|alt.badge.img+6

Hi,

I am working on an app that doesn’t have user account management and is already integrated with RevenueCat for some existing features. We’re introducing a new feature where users can purchase digital stickers.

There are thousands of sticker packs, and new ones are added regularly. Therefore, creating individual products for each sticker pack isn’t practical. Instead, we’ve categorized the stickers into pricing tiers: for example, product_sticker_tier_1 and product_sticker_tier_2, which are set up as consumables on Google Play and the App Store. Each sticker is associated with a unique ID, such as:

  • sticker_a: associated with sticker_tier_1
  • sticker_b: associated with sticker_tier_1
  • sticker_c: associated with sticker_tier_2

When a sticker is purchased, the app must send an API request to our backend to deliver the sticker to the user. However, I need to ensure that the server can validate whether a user (identified only by an anonymous ID) has purchased the corresponding sticker before allowing the download.

My question is how can I use RevenueCat’s API for the validation flow, so I can verify on server that the purchase of a specific sticker (e.g., sticker_a) has been made by the user?

I’m looking for guidance on how to handle this scenario effectively with RevenueCat while maintaining data integrity and user security.

3 replies

wes_clark
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 263 replies
  • December 18, 2024

Hi! Unfortunately, because of how the stores handle consumables on receipts, it is necessary to use a custom App User ID system in order to track past consumables after the transaction has finished. Here is our documentation on the topic


Forum|alt.badge.img+6
  • Author
  • Member
  • 8 replies
  • December 21, 2024

Thanks for the reply.

Assume that I do introduce an account system to manage this, how would I handle the thousands of products on RevenueCat? It’s not feasible to create one product for each digital sticker. Then on the server side, how can I be sure that a user has indeed purchases sticker since there is corresponding entitlement?


wes_clark
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 263 replies
  • January 9, 2025

I apologize for the delay over our holiday period. If you were to introduce an account system on your end in order to manage this use case, I would recommend storing the corresponding sticker that an individual consumable purchase unlocked on your end as we say in our documentation on non-subscription purchases.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings