1

Background

I'm currently implementing a google play subscription. I am experienced with regular in app purchases.

Issue

The recommended way to get updates about subscription events is to enable pub/sub notifications. However I've noticed 2 sections in the documentation contradict each other:

On the subscriptions page it's stated that

The purchase token is valid from subscription signup until 60 days after expiration. After this date, the purchase token is no longer valid to use to call the Google Play Developer API.

However, in the documentation about the notification payload it's stated that

purchaseToken string The token provided to the user's device when the subscription was purchased.

Google tells you to use the purchaseToken from the notification to call the google play api to fetch details about the subscription, however that would imply that after 60 days this isn't possible as the token would have expired?

How is this usually handled? If statement 2 is correct, the purchase token always stays the same (which makes sense) but then it shouldn't expire as I'm otherwise not able to query details about this subscription anymore.

asked Apr 8, 2025 at 7:48
0

1 Answer 1

0

You should be saving the details about the purchase token to your database, especially if you plan to use information for reference after the purchase token (subscription) is expired.

If expired and it's been longer than 60 days. You'll get the error:
subscriptionPurchaseNoLongerAvailable

If the user's account that made the token is deleted, when querying the purchase token, you'll get this error:
purchaseTokenNoLongerValid

Solution:
Update server code to contain the info of future purchase tokens when you receive them or within 60 days of them expiring.

answered Jul 6, 2025 at 9:56
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.