Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play Android Developer API changes init purchase time for same purchase

I'm validating my Google Play Android subscription purchases server side against

https://developers.google.com/android-publisher/archive/v1/purchases/get

I'm running into the case where initiationTimestampMsec is different from the value in the past.

https://developers.google.com/android-publisher/archive/v1/purchases#resource

I come across this as I have a test case with a specific purchase to validate that the init time is always the same.

The original init time is 1366679371220 (Tue, 23 Apr 2013 01:09:31 GMT). This test case always passed and the code is according to git blame not touched since 2013-04-28.

When I'm running the test right now, the init time of THE SAME purchase has 1400807382943 (Fri, 23 May 2014 01:09:42 GMT) as it's initiationTimestampMsec. Interesting to note the difference of the purchase time on the day and the time of day.

The GET request I make is

https://www.googleapis.com/androidpublisher/v1/applications/<app_id>/subscriptions/product_name/purchases/<purchase_token>?access_token=<access_token> 

The purchase itself is logged into my production DB with the init timestamp from my test case (1366679371220)

EDIT: After having a email conversation with Google, this seems to be a bug that they are aware of.

like image 699
philipp Avatar asked Jun 10 '26 09:06

philipp


1 Answers

I just discovered that when a user cancels his subscription through Google Play app, the "initiationTimestampMsec" (in v1 and v1.1) or "startTimeMillis" (in v2) is updated with the time of the cancellation. Maybe that's what's happening with you?

I just created a related question few minutes ago, maybe you could help me with the value of this field when the subscription gets renewed. Google Play Developer API: "startTimeMillis" is updated when it should not

This answer should go as a comment but I don't have enough reputation yet to do so. Sorry.

like image 167
blindOSX Avatar answered Jun 13 '26 09:06

blindOSX