3

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.

philipp
  • 4,133
  • 1
  • 36
  • 35
  • I have just had the same issue occur on my production system, although my time stamps remain at the same time of day, but the dates are a month out. A subscription, originally purchased at 2014-06-22 05:46 (22nd June), now has the initiationTimestampMsec set to 2014-07-22 05:46 (22nd July). I wonder if the initiationTimestampMsec will get reset each month. – LongSteve Jul 25 '14 at 09:53
  • the initial time stamp should always stay the same. It was consistent for us for over 1 year. It's a bug in Googles end that they are supposed to fix. – philipp Jul 25 '14 at 17:58

1 Answers1

2

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.

Community
  • 1
  • 1
blindOSX
  • 711
  • 8
  • 14
  • Good find. as mentioned in my comment. it was a bug on googles side. Let me close that question. – philipp Dec 12 '14 at 05:10