Skip to main content
Solved

Cannot see free trial offer for a Google Play subscription


Forum|alt.badge.img+4

What could be the reason that I cannot access my Google Play subscription’s free trial offer from the SDK by calling `aPackage.product.subscriptionOptions?.freeTrial`? It is always null.

This is a new subscription product which I created after reading through your migration guide from 5.x -6.x. It was suggested there that I should create new subscription products, so I did. I used to have two products, one annual and one monthly. I created a new single subscription with 2 base plans and an annual which has the free trial offer. With the old setup and 5.x version this worked, but now I cannot see the free trial in the new base plan at all. Any help is appreciated. All base plans and the new offer are active in Play console and the products have been added to RC packages. Also this annual base plan looks to be “backwards compatible”.


This happens with the latest 6.3.0 version of the purchases SDK.

Best answer by MarcosC

Hi :wave:

 

>The eligibility criteria is “New customer acquisition” and the Entitlement is “Never had any subscription”. I was thinking that maybe my test user cannot see the offer because it has purchased it in the past so I created also a completely new user but it did not make any difference.

yeah, if the test user already purchased an offer, it won’t show up. Google is the one filtering that. You could create an offer with eligibility criteria: developer determined. That way, you have control over it (instead of google being the one deciding)

 

>I use the Purchases.shared.getOfferings to get the packages. If I now iterate through the packages and all SubscriptionOptions and their PricingPhases I just get these two: annual P1Y and monthly P1M. Check the screenshot of my debugging dialog. The free trial offer is tied to the annual base plan.

I was suggesting that just to see if we are getting the offer or not (not suggesting to change it, only for debugging purposes)

 

From that screenshot, the offer is not being returned to you by Google. I would try as suggested with a dev determined offer or you could try purchasing with a different test account

View original
Did this post help you find an answer to your question?

15 replies

MarcosC
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 167 replies
  • May 29, 2023

Hi @Petri 

What type of offer have you created? What was the eligibility criteria?

Can you iterate over Subscription Options to see what options are returned? Maybe the offer is not returned to your device.

the freeTrial checks for property checks if there is a free trial pricing phase - https://github.com/RevenueCat/purchases-android/blob/main/public/src/main/java/com/revenuecat/purchases/models/SubscriptionOptions.kt#L23

 


Forum|alt.badge.img+4
  • Author
  • New Member
  • 3 replies
  • May 29, 2023

Hey @MarcosC ,

The eligibility criteria is “New customer acquisition” and the Entitlement is “Never had any subscription”. I was thinking that maybe my test user cannot see the offer because it has purchased it in the past so I created also a completely new user but it did not make any difference.

I use the Purchases.shared.getOfferings to get the packages. If I now iterate through the packages and all SubscriptionOptions and their PricingPhases I just get these two: annual P1Y and monthly P1M. Check the screenshot of my debugging dialog. The free trial offer is tied to the annual base plan.

Any help is very much appreciated! 🙏

 


MarcosC
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • 167 replies
  • Answer
  • May 29, 2023

Hi :wave:

 

>The eligibility criteria is “New customer acquisition” and the Entitlement is “Never had any subscription”. I was thinking that maybe my test user cannot see the offer because it has purchased it in the past so I created also a completely new user but it did not make any difference.

yeah, if the test user already purchased an offer, it won’t show up. Google is the one filtering that. You could create an offer with eligibility criteria: developer determined. That way, you have control over it (instead of google being the one deciding)

 

>I use the Purchases.shared.getOfferings to get the packages. If I now iterate through the packages and all SubscriptionOptions and their PricingPhases I just get these two: annual P1Y and monthly P1M. Check the screenshot of my debugging dialog. The free trial offer is tied to the annual base plan.

I was suggesting that just to see if we are getting the offer or not (not suggesting to change it, only for debugging purposes)

 

From that screenshot, the offer is not being returned to you by Google. I would try as suggested with a dev determined offer or you could try purchasing with a different test account


Forum|alt.badge.img+4
  • Author
  • New Member
  • 3 replies
  • May 30, 2023

yeah, if the test user already purchased an offer, it won’t show up. Google is the one filtering that. You could create an offer with eligibility criteria: developer determined. That way, you have control over it (instead of google being the one deciding)

Well well, you are right! I created a new offer which is “Developer determined” and it showed up! I had already made a new test user account but… somehow it still could not see the Google-determined-offer. I wonder why? Was it because the account was created to the same device?

Otherwise this is perfect for me – if Google determines the eligibility correctly. It makes things so much simpler in my end regarding paywall texts and so on. I think I will just push the update out and see what happens.

Thanks for your help!


Forum|alt.badge.img+5
  • New Member
  • 2 replies
  • September 20, 2023

>The eligibility criteria is “New customer acquisition” and the Entitlement is “Never had any subscription”. I was thinking that maybe my test user cannot see the offer because it has purchased it in the past so I created also a completely new user but it did not make any difference.

yeah, if the test user already purchased an offer, it won’t show up. Google is the one filtering that. You could create an offer with eligibility criteria: developer determined. That way, you have control over it (instead of google being the one deciding)

 

Is there any way to reset the test Google Play user so that they become a “New customer” again? Otherwise it’s difficult to test because a new Google Play account would need to be created on each attempt. Any testing tips would be appreciated here :)


Forum|alt.badge.img+5
  • New Member
  • 2 replies
  • September 22, 2023

@MarcosC any testing tips for the above message?


Forum|alt.badge.img+3
  • Member
  • 7 replies
  • May 17, 2024

Just tested it and it works. You need to:

  1. Download the "Play Billing Lab" app from google, (be careful, you need to have a recent version of Android - mine works at API 34)
  2. In the configuration settings set the country and click the box that says "Test free trial or introductory offer"
  3. With the same account test your app. It must show now the trial even if you have already "test bought" before a subscription.


https://developer.android.com/google/play/billing/test#play-billing-lab:~:text=With%20the%20Play,to%20new%20subscribers
 


Forum|alt.badge.img
  • Member
  • 8 replies
  • February 16, 2025

@tilpap unfortunately this doesn’t work for me. I’m logged in with a licensed test account into Google Play Billing Lab, and it doesn’t detect my subscriptions and the free trials don’t work. ​@Haley Pace, does RevenueCat have documentation about this app?


Forum|alt.badge.img+3
  • Member
  • 7 replies
  • February 16, 2025

@MagUnsafe  The  "Play Billing Lab" app has nothing to do with detecting your subscriptions. If your subscriptions can’t be detected there is probably a problem with your code. Also it takes sometime from the moment you define offerings in RC & Play Console till they are recognized in your app.


Forum|alt.badge.img
  • Member
  • 8 replies
  • February 16, 2025

Thanks for answering ​@tilpap. Well, the subscriptions are working correctly in my Expo development build, using the RevenueCat sdk. I cant subscribe, unsubscribe without any problem. The issue is resetting the test users, as Google detects that the test user is not a new user after the first purchase and doesn’t show the free trial, making it hard to test.

My test user is correctly set in the list of licensed testers. I also tried by installing the app directly from Google Play (closed track sharing), and nothing appears in Play Billing Lab.


Forum|alt.badge.img+3
  • Member
  • 7 replies
  • February 16, 2025

@MagUnsafe Just tested it with my app, and it works fine on Android Studio. In my case I have a single email address (doesn’t have to be a gmail, mine is foo@hotmail.com) for the following:
 

  • Account for PlayStore of the Emulator device. (Open PlayStore app, top right, whats the email account).
  • Account for Play Billing Lab app, (top right). You also have to Refresh, open configuration settings, and tick on the “Test free trial or introductory offer, and pick your country/region for testing (the one you currently are). Then Activate.
  • Login with this account in your app. I am using sign in with google with this account.
  • Have the same account in Testers email list in Play Console.

Having these conditions true and testing the app in android emulator, makes the trial reset properly, at least in my case.


Forum|alt.badge.img
  • Member
  • 8 replies
  • February 16, 2025

@tilpap thank you! So you’d recommend always using the emulator for this? I didn’t know you could use Google Play and sign in with google with an email like foo@hotmail.com.

Is there a similar procedure for iOS? How can I reset a tester account easily to test the free trial?

Thanks!


Forum|alt.badge.img+3
  • Member
  • 7 replies
  • February 16, 2025

@MagUnsafe In a real device sometimes I get problems with subscriptions and RC (in debug mode). Emulator always works for me. I suppose it's the same for IOS but haven't tried it yet. Will do though this month! You don't need to reset a test account. Just have all of these conditions met, open the billing app, activate, and you are good to go for the next 2 hours or so! Did it work for you?


Forum|alt.badge.img
  • Member
  • 8 replies
  • February 16, 2025

Sorry ​@tilpap, but I’m a full noob at using this emulator. I really don’t understand this part:

tilpap wrote:

@MagUnsafe Just tested it with my app, and it works fine on Android Studio. In my case I have a single email address (doesn’t have to be a gmail, mine is foo@hotmail.com) for the following:
 

  • Account for PlayStore of the Emulator device. (Open PlayStore app, top right, whats the email account).

 

Do you mean that you can use a fake email address to sign in to Google Play? I tried with a random valid email, but it seems that you need a real Google account to sign in.


Forum|alt.badge.img+8
  • RevenueCat Staff
  • 514 replies
  • February 21, 2025

Hi ​@MagUnsafe we recommend testing with a licensed Google Play tester, a fake email address won’t work.

In regards to free trials, iOS will automatically detect and apply these (docs here) and for testing these multiple times you’ll want to create a brand new Apple sandbox tester account to gain new eligibility. For Android these can be automatically applied if you pass a StoreProduct or Package to PurchaseParams.Builder (docs here) and it is the same for retesting where you’ll want to use a new Google licensed tester account.

See our sandbox testing guides for more details:

https://www.revenuecat.com/docs/test-and-launch/sandbox/apple-app-store

https://www.revenuecat.com/docs/test-and-launch/sandbox/google-play-store


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