Skip to main content
Solved

How to handle consumable IAPs without offerings, entitlements etc?

  • February 16, 2024
  • 6 replies
  • 794 views

Forum|alt.badge.img+5

I have some IAP consumables in the app store, I am implementing RC to expand to android and web..

 

I handle my consumable with storekit2 successfully like this:

  • customer buys the IAP
  • after the transaction is succesful then I add the credits to userdefaults or coredata
  • user use the credits and I manage the counter in the app
  • when counter is 0 then trigger IAP again

 

I am confused how to do this in RC, I assume I just create a product and do not attach offering, entitlements etc?
I just want RC to handle the payment, tell me the customer actually paid and then I’ll handle the rest

 

 

Best answer by nat-serrano

the issue was that I needed to release the DAMN internal track in google play store for the products to become available. possibly you need to add this to your documentation so devs can avoid going crazy debugging something that was working on your side.

View original
Did this post help you find an answer to your question?
This post has been closed for comments

6 replies

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • February 20, 2024

Hey @nat-serrano !

 

To do what you are intending, you will just need to add the product to RC, then allow the product to be purchased in your code. I would not add any entitlement to this product as that entitlement would be unlocked forever if you did this for a consumable purchase. 

 

If you add a consumable product to an entitlement, RevenueCat will report that entitlement as unlocked (forever), even after one purchase. This is because there is no expiration date for consumables, like there is for a subscription. This may work for some use-cases, but generally, you wouldn't add a consumable product to an entitlement meant to be unlocked by a subscription.

 

More information on this can be added here: https://www.revenuecat.com/docs/platform-resources/non-subscriptions

 

Let me know if that helps! 


Forum|alt.badge.img+5
  • Author
  • Helper
  • 22 replies
  • February 20, 2024

ok I removed the entitlement, I thought that entitlements were mandatory based on what I read in the documentation, I still left the offerings,

 

so that means I need to buy a product using the product identifier right?

the documentation is still confusing about one time purchases, because they still associate the single product purchase with an entitlement, example:
https://www.revenuecat.com/docs/getting-started/making-purchases

// Note: if you are not using offerings/packages to purchase In-app products, you can use purchaseStoreProduct and getProducts

try {
const { customerInfo, productIdentifier } =
await Purchases.purchaseStoreProduct(productToBuy);
if (
typeof purchaseResult.customerInfo.entitlements.active[
"my_entitlement_identifier"
] !== "undefined"
) {
// Unlock that great "pro" content
}
} catch (e) {
if (!e.userCancelled) {
showError(e);
}
}


Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • February 26, 2024

Hey @nat-serrano !

 

Correct, if you are not using offerings you can use the product identifier instead and call purchaseProduct. 

 

More information on this can be found here: https://revenuecat.github.io/react-native-purchases-docs/7.21.1/classes/default.html#purchaseProduct


Forum|alt.badge.img+5
  • Author
  • Helper
  • 22 replies
  • February 27, 2024

thanks, but the problem with purchasing products like this is that is no longer agnostic right?

I have product identifiers for android, ios and web. 

then I need to handle the logic inside the app, is this product an ios? yes then use ios identifier. right?


Forum|alt.badge.img+5
  • Author
  • Helper
  • 22 replies
  • February 27, 2024

I see this in the logs
 

 


Forum|alt.badge.img+5
  • Author
  • Helper
  • 22 replies
  • Answer
  • February 28, 2024

the issue was that I needed to release the DAMN internal track in google play store for the products to become available. possibly you need to add this to your documentation so devs can avoid going crazy debugging something that was working on your side.


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