Skip to main content
Solved

Are Introductory Offers Added to allPurchasedProductIdentifiers


Forum|alt.badge.img+2

I’m building frontend logic to either:

  1. Show eligible users an offer with a 3-day free trial (a promotional offer)
  2. Show ineligible users a paywall without the trial offer.

I know that  checkTrialOrIntroDiscountEligibility exists for ios. But there isn’t a similar function for android devices. 

So I’m trying to build a workaround with allPurchasedProductIdentifiers in the CustomerInfo object. 

 

My question:  I’m wondering if free trials and introductory offers are added to the allPurchasedProductIdentifiers array when the trial starts. If so, then I can simply check to see if the length of allPurchasedProductIdentifiers to determine which offer to display. 

If not, are free trials and introductory offers recorded somewhere else that I can check on android?

Best answer by kaitlin

Hey ​@Chris Thornham,

Introductory offers or trials on products should be included in `allPurchasedProductIdentifiers`. Another way you can look at this is, if you have attached your products to entitlements, you can check `EntitlementInfos` with `isNotEmpty()`. If the Entitlements array is empty, the user has never had access to this entitlement through any product and is eligible for an intro offer. 

Otherwise, if you don’t user Entitlements, you can use `allPurchasedProductIdentifiers` as you said, or `allPurchaseDatesByProduct` would also work for you to check if the product has previously been purchased. 

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

2 replies

kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 365 replies
  • Answer
  • January 10, 2025

Hey ​@Chris Thornham,

Introductory offers or trials on products should be included in `allPurchasedProductIdentifiers`. Another way you can look at this is, if you have attached your products to entitlements, you can check `EntitlementInfos` with `isNotEmpty()`. If the Entitlements array is empty, the user has never had access to this entitlement through any product and is eligible for an intro offer. 

Otherwise, if you don’t user Entitlements, you can use `allPurchasedProductIdentifiers` as you said, or `allPurchaseDatesByProduct` would also work for you to check if the product has previously been purchased. 


Forum|alt.badge.img+2
  • Author
  • Active Member
  • 11 replies
  • January 10, 2025

Beautiful! Thank you ​@kaitlin 

These design patterns would be a nice addition to this section of the docs. 


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