6

Keep receiving error "subscriptionNotOwnedByUser" from Google's when acknowledging a subscription upgrade/downgrade using Google's developer API for server-side subscription verification.

The purchase token was extracted directly from the notification received from Google's real-time developer notification. Tried searching this error but no luck.

Thanks for any help.

Error message:

{
  "error": {
    "errors": [
      {
        "domain": "androidpublisher",
        "reason": "subscriptionNotOwnedByUser",
        "message": "The subscription purchase not is owned by the user.",
      }
    ],
    "code": 400,
    "message": "The subscription purchase not is owned by the user."
  }
}
LHYNIV
  • 81
  • 4
  • Why is Android Things a tag? Is this somehow related to an IoT device but you forgot to mention it on the question? – shalafi Sep 14 '19 at 18:37
  • Sorry, wrong tag. updated. – LHYNIV Sep 16 '19 at 12:24
  • What call are you making? and what are the parameters you are using to make the call? Are you referring to this https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/acknowledge ? – Isai Damier Oct 07 '19 at 21:55

1 Answers1

5

While subscription auto renewal you need not do acknowledge once again. Because the same purchase token was already acknowledged at the time of Subscription Purchase. So when you acknowledge the already acknowledged Subscription you'll get this error.

I faced the same exact error in my case so I remove the acknowledging part while subscription renewal.

Mohanraj
  • 296
  • 2
  • 13
  • How do you distinguish the subscription is a renewal or not? By checking PaymentState is 2 namely the state of subscription is trial or not? – zangw Jun 18 '21 at 11:50
  • In notification, you have notificationType field. By this field you can identify new subscription purchase or purchase renewal, etc,. https://developer.android.com/google/play/billing/rtdn-reference#sub – Mohanraj Jun 19 '21 at 13:10
  • Thank you for your reply. We did not receive notification on our server-side before and will do it later. We are curious to know whether SUBSCRIPTION_PURCHASED includes a free trial or not? – zangw Jun 21 '21 at 03:06
  • The error messase is totally irrelevant and confusing. – yaugenka Aug 27 '23 at 09:17