5

I am trying to use the Google Publisher API for backend upgrade/downgrade operations of the subscriptions of my Android app.

I published the app in Alpha channel and having some testers making "test" purchases. Everything looks good during the same day the subscription has been generated. I can see valid data using the purchase token, calling the method:

Purchases.Subscriptions.Get

My problem is that when the "test" subscription renews automatically (the day after), looks like the purchase token is not usable anymore and when I call the method:

Purchases.Subscriptions.Get

I get this error:

The purchase token does not match the package name. [400]

Looks like that when a "test" subscription renews automatically, the Purchase token changes as well.

  • Does anybody have my same problem?
  • Any ideas why the purchase token changes on subscription auto-renew?
  • Shouldn't the purchase token remain always the same even after an auto-renew?
bre_dev
  • 562
  • 3
  • 21
  • I spent 2 days to understand whats the hack is going on. The problem was that I really make mistake in word of package name. In my case problem was in Firebase->Functions->Config->App->package_name so. Also you can add https://www.npmjs.com/package/google-play-billing-validator to make validation before use main purchase functions. So re check it twice and all goes work. – Dmitry Velychko Dec 10 '19 at 10:15

0 Answers0