Solved

Expo: How to purchase One time In-App product in revenue cat

  • 28 June 2023
  • 1 reply
  • 380 views

Badge +2

I have added in app products in play console and also imported them to revenue cat dashboard, i am also fetching and displaying these products in my app, now i know that there is a method called "Purchases.purchaseProduct" but i dont know how to use it. 

For Purchases.purchasePackage method we get customerInfo object back on successfull purchase but what do we get or how do we know user successfully bought the product, i can only see  Purchases.purchaseProduct in documentation

 

Here is the documentation that i am referring to

 

Making Purchases

icon

Best answer by Michael Fogel 29 June 2023, 21:53

View original

1 reply

Userlevel 4
Badge +6

Hey @anonimia ,

 

You can use the customerInfo object that you get as a response to check and confirm whether or not the person had made a successful purchase by checking their entitlements that they have after the call. If they have the entitlement associated with whatever product was purchased, then that purchase was a success and they should be able to access anything that is supposed to be accessible//unlocked with that entitlement. 

 

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

 

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

 

More information on the customerInfo object and checking subscriptions can be found here: https://www.revenuecat.com/docs/customer-info

 

Reply