Let's say I have saved the token from when a user has purchased an automatically renewing subscription via Google Play. When that subscription is automatically renewed, can I still use that older, initial token to get the current status of that subscription (via Purchases.subscriptions: get)?
A successful purchase also generates a purchase token, which is a unique identifier that represents the user and the product ID for the in-app product they purchased.
Yes, you can. That token does not change. You will pass this token in your request to find out if the subscription has renewed or not. Make sure you do not lose that token otherwise it will be a nightmare to figure out if the user has renewed or not.
The purchase token changes when user cancels the auto-renewal and restarts the subscription before the current period ends ( turns the auto-renew back on from play store), does upgrades/downgrades, purchases new subscription after an old subscription lapsed + for SOME cases when the order is on hold and the subscription is recovered. Almost sure Purchases.subscriptions: get response will not contain the new receipt when using the old token in this cases.
Resignup refers to when a user subscribes, cancels their subscription, and then re-subscribes before the original subscription has expired. Although they have not lost entitlement and the new subscription will be the same as the previous one, they will go through another purchase flow as they are committing to future payments. They will receive a new purchase token and the linkedPurchaseToken field will be set, as in the case of an upgrade or downgrade.
You can read more at Medium post here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With