0

How to distinguish between refunded subscription and user-self canceled subscription?

Both shows Expiring date (expiryTimeMillis) and cancellation date (userCancellationTimeMillis) same.

I did not find a single clue to dissent those from each other, is there any?

Thanks in advance.

sadiq
  • 2,238
  • 19
  • 21

2 Answers2

0

The only way to differentiate is keeping a record in the database! I hope google would have a more comprehensive API in the future.

sadiq
  • 2,238
  • 19
  • 21
0

You can obtain the details of subscription purchase using Google Play Developer API

  "kind": string,
  "startTimeMillis": string,
  "expiryTimeMillis": string,
  "autoResumeTimeMillis": string,
  "autoRenewing": boolean,
  "priceCurrencyCode": string,
  "priceAmountMicros": string,
  "introductoryPriceInfo": {
    object (IntroductoryPriceInfo)
  },
  "countryCode": string,
  "developerPayload": string,
  "paymentState": integer,
  "cancelReason": integer,
  "userCancellationTimeMillis": string,
  ...

where field cancelReason defines the details of cancelation. Possible values are:

    1. User canceled the subscription
    1. Subscription was canceled by the system, for example because of a billing problem
    1. Subscription was replaced with a new subscription
    1. Subscription was canceled by the developer
volda
  • 101
  • 1
  • 2