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:
- I created two subscriptions, let’s call them
sub1
andsub2
, both with introductory offers. - When I attempt to purchase
sub1
, I correctly see the introductory offer. - However, when I try to change my subscription plan from
sub1
tosub2
, 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.