Question

How do I get he product info from the productIdentifier

  • 9 March 2022
  • 2 replies
  • 225 views

Badge +1

I am using RevenueCat for inline purchase and I would like to be able to show the data in the attached image. In particular, I need to show following subscription data:

subscription name: Was able to get entitlementInfo.identifier but I need entitlementInfo.description. I could not get that.

purchase value: Can't get that from entitlementInfo.

subscription period: Can't get that from entitlement info.

expirationDate: was able to get it from entitlementInfo.expirationDate

In the entitlementInfo there is a property called productIdentifier which can help me get some of the data I want. But I will need to map productIdentifier to the correct package. Does anyone knows how to do that?

 


2 replies

Userlevel 5
Badge +9

The best way to easily and accurately to show the user the status of their subscription is to send them to their device’s subscription settings page using the managementURL property of the purchaserInfo. The URL will deeplink directly to your app’s subscription settings page on the device, where the user can check how much they paid, when the subscription will renew, ways to cancel, etc. It’s the most accurate representation of the user’s subscription on the device and gives the user more actions to manage their subscription than inside your app, so we highly recommend using it.

If you really want to display that info in your app, here’s where to get each piece of info:

subscription name: You can get the name of the subscription product using title property of the product. The description of the entitlement isn’t available via the SDK or REST API yet - we’re working on providing better functionality here in future iterations of our API.

purchase value: This is tricky. You can get the current price of the product by using the priceString property of the product. If they’re in an intro period you should use the introductoryPrice instead. But it’s possible that the current price of the product doesn’t match the price that the customer paid - for example if you changed the price after they purchased it, they redeemed an offer code or promo code for the product, etc. So the best option is to direct them to the device’s subscription settings for price info. Maybe include all of the other information except the price?

subscription period: You can get this from the packageType property of the package. Note that if you use custom packages then the packageType will be CUSTOM.

expirationDate: You can get this from the entitlementInfo like you said.

Badge

I have a similar question.  My app is in Flutter and all my offerings/products/entitlements are associated with Subscriptions.

The getOfferings() data has a user friendly description of the content to be purchased.  The offering description is shown to the user as friendly name to describe the subscription.  

When getCustomerInfo() is called the active entitlements do not reflect offering description.  It would be best if the app could tell the user that the subscription has been purchased and use the same description string as the offering. 

Is this possible?

Also, if the management URL is used, this does not reflect the description configured in RevenueCat. 

Thank you,

Reply