Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Order Id of Android subscriptions

According to Google's documentation order ids of subscriptions have following format:

12999556515565155651.5565135565155651 (base order number) 12999556515565155651.5565135565155651..0 (initial purchase orderID) 12999556515565155651.5565135565155651..1 (first recurrence orderID) 12999556515565155651.5565135565155651..2 (second recurrence orderID)

I feel confused with dots in order id. As I understood it's impossible to test this without making real purchase. But I can't wait for a month to test it. I created test subscription with 7 days trial. After first purchase it got me JSON with order id:

12999763169054705758.1316440597013773 (trial)

Can someone confirm that next purchases will follow format? 12999763169054705758.1316440597013773..0 (first purchase after trial expired) 12999763169054705758.1316440597013773..1 (second purchase) .... 12999763169054705758.1316440597013773.25 (25th purchase) ?

Also if I setup subscription with no trial period that will first purchase have order id 12999763169054705758.1316440597013773..0 ?

Last question. Does getPurchases() return only the JSON with last order id or all records including previous purchases?

Thanks in advance.

like image 384
Yuriy Avatar asked Apr 27 '14 21:04

Yuriy


People also ask

What is order ID in Google pay?

This is the Transaction ID for your order. The Google Wallet Transaction ID is typically formatted like this: 01234567890123456789.token.0123456789012345 or 0.G.123456789012345.

Where do I find Google Play order ID?

On the left menu, select Subscriptions and services. On the “Other purchase activity” card, select View purchases. Select the “Google Play” (or "Android Market") registration transaction. You will see your Transaction ID at the bottom right corner of the page.


1 Answers

Now I know answer at least for non-trial accounts. Order ids follow exactly specified format

12999556515565155651.5565135565155651 (base order number) 12999556515565155651.5565135565155651..0 (initial purchase orderID) 12999556515565155651.5565135565155651..1 (first recurrence orderID) 12999556515565155651.5565135565155651..2 (second recurrence orderID)

So after first purchase your order id will be 12999556515565155651.5565135565155651 and after second 12999556515565155651.5565135565155651..0 and so on.

like image 141
Yuriy Avatar answered Oct 19 '22 03:10

Yuriy