Skip to main content
Question

Check eligibility of introductory offers in android

  • December 3, 2024
  • 1 reply
  • 54 views

Forum|alt.badge.img

Hello,

I’m trying to check if a user is eligible for an introductory price on Android to display the correct information, but I’m encountering issues. I’ve implemented the following code to check the introductory and free trial prices:


    val introProductPrice = product.subscriptionOptions?.introOffer?.introPhase?.price?.amountMicros ?: 0
    val freeTrialPrice = product.subscriptionOptions?.freeTrial?.freePhase?.price?.amountMicros ?: 0

However, I’m only getting the discounted price. When attempting to purchase the subscription, Google Play displays an text saying that I am not eligible for free trial and instead shows the regular price.

Could you please clarify the correct way to check for introductory price eligibility, or if there is another method I should be using?

Here’s what I have done:

  1. I created two subscriptions, let’s call them sub1 and sub2, both with introductory offers.
  2. When I attempt to purchase sub1, I correctly see the introductory offer.
  3. However, when I try to change my subscription plan from sub1 to sub2, I’m still getting the discounted price in the code (as shown below), but in the Play Store, it displays the regular price.

Please let me know what I am doing wrong in this.

This post has been closed for comments

1 reply

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 313 replies
  • December 5, 2024

Hi ​@isoni-tenup,

You can find how to check if a user is eligible following this guide. Essentially, you have to look at `subscriptionOptions` inside `StoreProduct` and check for the different scenarios.

 

Let me know if that works!


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