I am looking at this document from Google Developer API for Subscription Purchases response the link below:
https://developers.google.com/android-publisher/api-ref/purchases/subscriptions#methods
Specifically, for the field linkedPurchaseToken
, two scenarios are mentioned:
- Re-signup of a canceled but non-lapsed subscription
- Upgrade/downgrade from a previous subscription
I am not sure when does the scenario #1 occur. Tried purchasing, canceling and restoring (while not-lapsed) an auto-renewable subscription, but I did not get a linkedPurchaseToken in the response after the restore.
Here are the responses in the three cases:
After Purchase:
{
"kind": "androidpublisher#subscriptionPurchase",
"startTimeMillis": "1573546099994",
"expiryTimeMillis": "1573548136296",
"autoRenewing": true,
"priceCurrencyCode": "INR",
"priceAmountMicros": "85000000",
"countryCode": "IN",
"developerPayload": "",
"paymentState": 1,
"orderId": "GPA.3359-7048-7648-05268",
"purchaseType": 0,
"acknowledgementState": 1
}
After cancellation:
{
"kind": "androidpublisher#subscriptionPurchase",
"startTimeMillis": "1573546099994",
"expiryTimeMillis": "1573548016296",
"autoRenewing": false,
"priceCurrencyCode": "INR",
"priceAmountMicros": "85000000",
"countryCode": "IN",
"developerPayload": "",
"paymentState": 1,
"cancelReason": 0,
"userCancellationTimeMillis": "1573546553870",
"cancelSurveyResult": {
"cancelSurveyReason": 0
},
"orderId": "GPA.3359-7048-7648-05268",
"purchaseType": 0,
"acknowledgementState": 1
}
After restoring:
{
"kind": "androidpublisher#subscriptionPurchase",
"startTimeMillis": "1573546099994",
"expiryTimeMillis": "1573548136296",
"autoRenewing": true,
"priceCurrencyCode": "INR",
"priceAmountMicros": "85000000",
"countryCode": "IN",
"developerPayload": "",
"paymentState": 1,
"orderId": "GPA.3359-7048-7648-05268",
"purchaseType": 0,
"acknowledgementState": 1
}
Is there a clue in what situation I should get the linkedPurchaseToken for #1 scenario?