StartTimeMillis is no longer updated in Google InApp Subscription Update

These questions relate to the startTimeMillisobject field Purchases.subscriptionsfrom Google.

If the user purchases something through Android, the application will send the purchase data to our Backend for verification and processing. The Google response form is an object Purchases.subscriptionsthat contains the data described here: https://developers.google.com/android-publisher/api-ref/purchases/subscriptions This object has two fields startTimeMillisand expiryTimeMillis.

If the purchase information is sent from our Backend to Google after the time in expiryTimeMillis, we will return a new object with an updated one expiryTimeMillis. This means that we are in the “next” update period. Our backend creates a new record with this new data. It works great.

However, I see strangeness in the records of our database. And in the code we wrote.

The documentation linked above indicates that startTimeMillisthis is the start date of the purchase of the subscription. So if I bought a subscription today, then "startTimeMillis" will be today, and "expiryTimeMillis will be 1 month from now. If I bought the subscription 3 months ago today, then thestartTimeMillis will be 3 months ago and theexpiryTimeMillis" will be 1 month from today - essentially 4 months between the two dates.

But this constant value of time for startTimeMillishappened only this year. I have subscriptions that have been working for more than a year, and all purchases that were made last year and which have been updated since then have different meanings for startTimeMillis. In principle, the field startTimeMillishas always been the time of the beginning of the current service period.

Then sometime in mid-January it stopped. startTimeMillisnow shows the purchase time of the subscription. I have hundreds of such signatures.

When did it happen? And why? In addition, I cannot find any documentation or notification that this change has occurred. Could someone shed light on what happened here?

+4
source share

Source: https://habr.com/ru/post/1651558/


All Articles