1 year ago
#353532
shakedpotato
The linked purchase token indicates the subscription that was not renewed because the payment was not succeeded
I am facing the problem, the linked purchase token unexpectedly indicates the previous subscription in the specific situation.
I wrote some codes related to linked purchase token, and something not expected happend. so I checked history of RTDN and SubscriptionPurchase. When RTDN comes, my web server requests SubscriptionPurchase to Google Play Developer API and save it in db.
I found some suspicious records. Allmost all of them look like the follows:
notification type | date RTDN received | expiry time | order id | purchase token | linked purchase token |
---|---|---|---|---|---|
4 | 2021-12-27 | 2022-01-27 | GPA.0000-0000-0000-0000-00000 | token_0 | |
5 | 2022-01-28 | 2022-01-27 | GPA.0000-0000-0000-0000-00000..0 | token_0 | |
13 | 2022-02-05 | 2022-02-05 | GPA.0000-0000-0000-0000-00000 | token_0 | |
4 | 2022-02-05 | 2022-03-05 | GPA.1111-1111-1111-1111-11111 | token_1 | token_0 |
Even though the previous subscription has expired, the linked purchase token indicates the previous one.
This looks so weired.
But a few of them look like the follows:
notification type | date RTDN received | expiry time | order id | purchase token | linked purchase token |
---|---|---|---|---|---|
4 | 2021-12-27 | 2022-01-27 | GPA.2222-2222-2222-2222-22222 | token_2 | |
5 | 2022-01-28 | 2022-01-27 | GPA.2222-2222-2222-2222-22222..0 | token_2 | |
13 | 2022-01-29 | 2022-01-29 | GPA.2222-2222-2222-2222-22222 | token_2 | |
4 | 2022-01-29 | 2022-02-28 | GPA.3333-3333-3333-3333-33333 | token_3 |
No linked purchase token. This is what I expected.
I think the situation should occur by the following actions:
- Purchase a subscription.
- Make the subscription state enter into account hold when the subscription renews.
- Purchase a subscription which is the same sku as you bought at step 1. by billingClient.launchBillingFlow(), NOT fixing the payment method in Google play store app.
By license testers, the linked purchase token of the subscription which is bought after account hold is always empty.
Are these correct behaviours?
I also want to know what affect the linked purchase token.
Is any one facing this?
android
google-play
in-app-billing
in-app-subscription
google-play-developer-api
0 Answers
Your Answer