Skip to main content
Question

Determining free trial eligibility (ios + android)


Forum|alt.badge.img

My paywall has dynamic terminology for if the user has access to a 7 day free trial or not and I want to determine if the user is eligible for the free trial offer I have setup for my subscription on ios and android.

My app is built in react native and I’m using the react-native-purchases library from RevenueCat.
I know for IOS I can use the 

const eligibility = await Purchases.checkTrialOrIntroductoryPriceEligibility(["myPackage"]);

but for Android this isn’t available/doesn’t work.
For Android can I fetch the offerings and check the introPrice field in the product and if it isn’t null I can assume that they’re eligible to use the free trial ?
 

const offerings = await Purchases.getOfferings();
const annualPackage = offerings.all["myPackage"]?.availablePackages.find(pkg => pkg.packageType === "ANNUAL");

if (annualPackage && annualPackage.product.introPrice != null) {
    setFreeTrial(true);
} 

 

3 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 413 replies
  • May 7, 2025

Hi ​@jordan-b72f22,

You are right, checkTrialOrIntroductoryPriceEligibility only works for iOS and will not return a valid eligibility on Android. For Android you can check `subscriptionOptions` to see if there are offers available. You can read our documentation here about how to handle the eligibility.

 

Best, 


Forum|alt.badge.img

Thanks Joan for your response.

Just to confirm when you say to check ‘subscriptionOptions’ is the code below sufficient to achieve that?

const offerings = await Purchases.getOfferings();
const annualPackage = offerings.all["myPackage"]?.availablePackages.find(pkg => pkg.packageType === "ANNUAL");

if (annualPackage && annualPackage.product.introPrice != null) {
    setFreeTrial(true);
} 

Thanks :) 


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 413 replies
  • May 14, 2025

Hi ​@jordan-b72f22,

I mean to use the subscriptionOptions that you can find in the storeProduct, like this:

val freeTrialOffer = storeProduct.subscriptionOptions?.freeTrial
val introductoryOffer = storeProduct.subscriptionOptions?.introOffer

Best,


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