Question

I created an active subscription on Google Developer Console for my Android app, currently in draft mode. I can purchase the subscription from my test device, but cannot verify the purchaseToken I am getting from the app with Purchase Status API on the server. I’m getting:

{
  "error": {
    "errors": [
      {
        "domain": "androidpublisher",
        "reason": "developerDoesNotOwnApplication",
        "message": "This developer account does not own the application."
      }
    ],
    "code": 401,
    "message": "This developer account does not own the application."
  }
}

I followed Google Play Developer API Guides for authorization flow so I know I am using a proper access token. (I checked the token with https://www.googleapis.com/oauth2/v1/tokeninfo and its user is my client id). So I am thinking that Purchase Status API does not recognize the purchases done with an app in draft mode. Also, I cannot see the order in my Google Merchant Console quite probably because of the same reason?

Did anyone encounter a similar issue? Is my assumption in previous paragraph correct?

As an extra info, getPurchases in the app returns the purchase in question and my credit card is actually charged. I am using v3 of in-app billing.

Was it helpful?

Solution

It turned out that the account client gave to me wasn't the root account but instead a secondary account. Once I got the root account and used it's credentials it worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top