Free Trial expire date incorrect? [Google Play]

Hi all,

I’ve just come across a strange issue regarding free trials and I can’t seem to find any evidence of it happening to anyone else. The quick story is that we want to utilise free trials for subscriptions on both Android (Google Play) and iOS in order to see more users signing up.

We have taken the following steps:

  • Changed the trial period from 0 to 30 days on our Google Play subscription.
  • Logged into a Google Play account that has not previously had a subscription.
  • Successfully bought a subscription with a free trial (with the correct date of renewal and first charge displayed on Google Play’s purchase UI).
  • Checked the database to see whether or not the subscription has updated correctly.

Where the strangeness has happened is that the period at which the subscription was recorded to eventually renew is only (exactly) a week from the time of purchase, rather than 30 days. There are ways in which we can account for this, but we’re wondering if anyone else has experienced this, whether we’re doing something wrong, or even whether this is expected behaviour. We have actually tested purchasing subscriptions properly (without the free trial) and that worked as it should, giving us an expiry date exactly a month ahead.

We have not gotten around to testing on iOS yet, but it will be my next task to look into that, and I’ll report back on whether or not that works fine.

tl;dr: Subscribing with a free trial period has recorded the expiry date 7 days in the future, rather than 30 days like the free trial has been set to be. Has anyone else experienced this? Are there any reasons why this is happening?

Thank you for reading!

EDIT: This was all done on production.

This is expected behavior in the Google test environment (Alpha/Beta/Internal Test)

Ah, I should have mentioned that this was in production. I can log into the Google Play account that was used and see that the subscription with the correct renewal date appears when navigating to the Subscriptions and Services page in the account settings.

1 Like

I’ve now tested iOS, which is working as it should.

Using Google Play’s API (Purchases.subscriptions: get), I was able to find information regarding the subscription and the expiryTimeMillis was correct. Curiously, it is not exactly 30 days, but it is close enough and that is the least of my concerns at the moment. (The exact time between startTimeMillis and expiryTimeMillis is 30 days, 1 hour, 59 minutes and 41 seconds.)

Is it possible that this is a bug on Unity’s end?

We are checking!

1 Like

No worries Jeff! Thanks for that. I’ll do a little bit more testing on my end to see if I can reproduce it as well.

It reproduces every time for you, right?

Yes, I have tested on two separate occasions and this has happened both times. I can do further testing, though the workflow for it is less than desirable (as a new Google account needs to be used each time, as well as a new account within our app).

Got it, likely no need to test further. We are checking

Great! Appreciate the help.

@JeffDUnity3D Any update on this? Just wondering as we need to fix this for a coming build.
I’m contemplating whether I should just implement a simple workaround for the time being.

No updates, we are still looking into it. It will be several weeks at a minimum most likely. I typically create several test subscriptions and several test users when developing my app. Can you confirm that it is still occurring? One review of the code and some Google searching led us to believe that it might only be an issue on Week 52-53 of the year.

No worries, I’ll do another test and report back.

Have just done another test and can confirm that it is still happening. Bought at 2020-01-22 23:23:04 UTC time and the date given back is 2020-01-29 23:23:04.

Got it, we are checking here too

1 Like

I just did a test in the Google Play internal test track (as I’m currently implementing a workaround for the initial 7/30 day inconsistency issue), and found some odd results:

  • Firstly, and the test track has never done this before, it seems as if it has done away with the Google Play test environment for subscriptions. They are no longer sandbox tests, it was registering the subscription (with free trial) directly to the Google account’s subscriptions, as if the subscription was purchased on a production version of the app. It never did this before I added a free trial to the subscription (however, this is also the first time I’ve used the test track to test subscriptions since adding the free trial).
  • I’m now logging the details of the subscription to an external bug tracking site, so that the team here has a constant log of the subscription details as they’re purchased, which are here:
Purchase Date - 01/24/2020 04:19:06
isSubscribed? - True
isExpired? - False
isCancelled? - False
isFreeTrial? - False
isAutoRenewing? - True
Remaining Time - 00:01:13.3445950
isIntroductoryPricePeriod - False
Introductory Price Period - 00:00:00
Introductory Price Period Cycles - 0
Introductory Price - not available
Expire Date - 01/24/2020 04:19:06
  • The strange this about the above is specifically isFreeTrial, which returns as false (my workaround was actually based on this variable, so it didn’t work correctly), and the Expire Date, which was given back as the exact same time as the purchase date.
  • Remaining Time is also strange, as it appears to only be a minute and 13 seconds (but maybe I’m reading the timestamp incorrectly).

Unsure whether this might help you out @JeffDUnity3D , but I think it’s worth having a record of the findings here regardless, in case someone else stumbles upon the same issue.

Seems like there’s definitely something weird going on but this time it seems like it might be a Google Play issue rather than a Unity issue. Unsure if the same results would occur in the production app. On my newly created Google account, the subscription free trial comes up as ending on February 23rd, which should be correct.

I’ll be attempting to implement the workaround again and I’ll report back if it’s successful that time.

Are you adding testers explicitly on your Dashboard, then browsing to the Opt-In link for testing on the device, and then downloading via Google Play? Test users should not be charged.

I added a newly created Google account to the list of test users under Manage Testers on the Internal Test track on the Google Play Console, before uploading a new build. Then I opened the Opt-In link on a browser window with only that Google account logged in. Downloaded via Google Play and the description matched the one entered when uploading the new build, so I’m fairly certain that it was the correct build tested.

I thought the behaviour was quite strange too, so I’ll do another fresh test tomorrow when I’m back in our office.

  • Implemented a new workaround regarding the 7 day trial issue.
  • Created a new Google account.
  • Added new Google account to testers on Internal Test Track of Google Play Console.
  • Accepted becoming a tester on the account.
  • Removed previous accounts on test device, logged in with new account.
  • Uploaded build to Internal Test Track.
  • Checked Play Store on test device, description of build updated to reflect new test build information.
  • Installed build, created account, app on development database as expected (is thus different to current live build).
  • Bought new subscription (UI indicated that I was buying a subscription, with 30 day free trial, despite being on Internal Test track - can post image if needed).
  • Got the following data back from our bug-tracking site:
Purchase Date - 01/28/2020 00:40:38 
isSubscribed? - True 
isExpired? - False 
isCancelled? - False 
isFreeTrial? - True 
isAutoRenewing? - True 
Remaining Time - 6.23:59:49.1937300 
isIntroductoryPricePeriod - False 
Introductory Price Period - 00:00:00 
Introductory Price Period Cycles - 0 
Introductory Price - not available 
Expire Date - 02/04/2020 00:40:38```

- New workaround worked correctly (as it is now based off the dates registered, rather than the isFreeTrial bool.

So I was able to recreate the weird behaviour of Google Play thinking it's in production. I assume it's not a Unity issue, but still good to note. As you can tell, the information returned from the previous test does not entirely match this test (isFreeTrial and Expire Date). This test more accurately reflects the issue of the expire date only being 7 days ahead.

As I now have a working workaround, I would call this "solved," but there are clearly still some... quirks, when working with the app stores. Would be great to eventually get an update on whether Unity has found out whether it's an issue on your end  @JeffDUnity3D .

Thank you for the help!

I am having a similar issue, free trial days is set to 14 days in dashboard, but expiry date is coming as 7 days in future for the subscription.
Only in android, IOS seems to be working fine.
This happend in production environment, this needs to be fixed immediately, as while purchase we show 14 days trial in the UI, users will start complaining that they are getting only 7 days.
@JeffDUnity3D . when will this be fixed?
@Harrishun Is it solved for u? what workaround did u put in the production environment?