简体   繁体   中英

How to link google play purchase with the corresponding subscription base plan and offer using Google Play Developer API?

There are two endpoints in Google Play Developer API providing information about the subscription purchased by the user (depending on the purchase token) - purchases.subscriptions and purchases.subscriptionsv2 . What is the proper way (and does it even exist?) to link that information with the corresponding subscription from Google Play Console, including the concrete base plan and offer?

v1 request doesn't contain any subscription identifiers, v2 request contains lineItems[].productId , which refers to the whole subscription. But none contain any information about base plans or offers, which were used to make the current purchase.

The second and smaller part of the question is where are located purchase price currency and amount in the v2 endpoint, which were available in the v1 endpoint?

Looks like Google has fixed this problem in the last API update and now there are basePlanId and offerId fields in OfferDetails in purchases.subscriptionsv2 request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM