11

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.

Yuriy
  • 1,466
  • 2
  • 14
  • 30

1 Answers1

4

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.

Yuriy
  • 1,466
  • 2
  • 14
  • 30
  • 1
    So is `12999556515565155651.5565135565155651` the trial order? Or the first payment of the new subscription? – Yu Chen Feb 18 '20 at 23:46