How to get orderId for an autorenewable transaction using Google Play Developer API?
Asked Answered
H

1

6

I've developed an android application, in which inapp subscription is done by play store billing version v3. And I implemented Google Play Developer api so as to retrieve the subscription status whether it is autorenewable or not.

The GET method of Google Play Developer APi returns this autorenewable status along with other details such as Expiry Time, Start Time etc. But I couldn't a find a possible solution to retrieve the order id of the subscription which is used for backend processing. Where I would get this transaction id by Google Play Developer api from?

Thanks in advance.

Hildahildagard answered 9/5, 2016 at 8:46 Comment(0)
C
5

You don't need orderID, you need "base orderID" and you can generate current orderID from startTime and expireTime

From Developer Android (https://developer.android.com/google/play/billing/billing_subscriptions.html#administering):

Subscription order numbers

To help you track transactions relating to a given subscription, Google payments provides a base Merchant Order Number for all recurrences of the subscription and denotes each recurring transaction by appending an integer as follows:

GPA.1234-5678-9012-34567 (base order number)

GPA.1234-5678-9012-34567..0 (first recurrence orderID)

GPA.1234-5678-9012-34567..1 (second recurrence orderID)

GPA.1234-5678-9012-34567..2 (third recurrence orderID)

Cognizant answered 24/5, 2016 at 8:44 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.