Skip to main content

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.

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

 


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! 🙏

 


Hi 👋

 

>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


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!


>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 :)


@MarcosC any testing tips for the above message?


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
 


Reply