0

I have implemented the InApp purchase in android for first time using

Android In-App Billing v3 Library

The subscription are successfully charged and displaying subscribed on Playstore, but not able to get the subscription expiry date and other information. The info am getting from respose is

**{
    "orderId": "GPA.3338-1902-5576-33309",
    "packageName": "XXXXXXXXXXXX",
    "productId": "XXXXXXXXXX",
    "purchaseTime": 1568890677033,
    "purchaseState": 0,
    "developerPayload": "XXXXXXXXX",
    "purchaseToken": "nablcikpknhkbfdkekhghiii.AO-J1OzE4eRePSXFnfV3ME-Gf50pkU6PzbSU3PKOmkR3Iwag040piJGUng9MLdUSylWRf1X8Mw5HlTMw_diU3_2Ez7-gja68tZm9iNkIu7A3IQfIqFmrthiXktwd_zlpukAhqSu9K5w6",
    "autoRenewing": true
}
  • Please check this link https://stackoverflow.com/questions/30620506/how-to-get-subscription-expire-date-in-inapp-v3-android – Madhav Sep 19 '19 at 11:59
  • Possible duplicate of [how to get subscription expire date in inapp v3 android](https://stackoverflow.com/questions/30620506/how-to-get-subscription-expire-date-in-inapp-v3-android) – Haem Sep 19 '19 at 12:22
  • Not able to find billingService interface in above library – Suresh Pawar Sep 19 '19 at 12:48

1 Answers1

0

Why would you worry about the subscription expiration date? Every time upon your app launches, you should call queryPurchases API from Play Billing Library.

This API will return a list of active SKUs (in-app and subs). If the subscription has expired, it won't be returned by this API. With that, you know the users is no long subscribed.

DrPower
  • 445
  • 3
  • 6