Unable to use Purchase.Subscription:acknowledge to acknowledge a subscription
Asked Answered
R

2

13

​Currently I use a server to receive GCP Pub/Sub messages, and I'd like to perform a Purchase.Subscriptions:acknowledge call to acknowledge the subscription that has not been acknowledged as the server received the notification.

Here is the scenario ...
A user buy subscription A, which is 30-day-period, and then upgrade to 1-year-period. On the server side, will receive the notification with the upgraded transaction when the 30-day-period subscription is about to be expired. As the server retrieve the information by using Purchase.Subscription:Get you can see the acknowledgeState of this upgraded transaction is 0, so the server calls Purchase.Subscription:Acknowledge to acknowledge this transaction, but the problem is it returns an error message saying "The subscription purchase not is owned by the use".

Here is what the error message looks like: ​

{
    "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."
    }
}

Does anyone have the same issue ?

The other information is that in the Android App, I set proration mode to DEFERRED in the BillingFlowParams class, that is why I can't acknowledge the new transaction in the App immediately since the state of the new transaction is not yet been PURCHASED, I can only do the acknowledgement on the server side.

Rainey answered 17/9, 2019 at 9:23 Comment(3)
Have you tried acknowledging the purchase after the change plan has actually taken place, i.e. after the current subscription has ended. This may not be a realistic solution but still wanted to know the behaviour.Promiscuity
When you try to acknowledge the purchase after it has expired this will happen. Did you try to acknowledge within expire time?Bradford
I was faced the same problem.Kindly take a look into this .. https://mcmap.net/q/908635/-google-play-error-quot-subscriptionnotownedbyuser-quot-when-acknowledging-purchase-token-of-a-subscriptionPublia
P
3

We were facing the same issue. We tried calling the acknowledgement API immediately after the user exercises the change of subscription in deferred mode, and also once the new subscription is activated at the store. In both the cases we were getting the same productNotOwnedByUser error. Ultimately, 3 days later the subscription would be revoked owing to the lack of acknowledgement.

We contacted Google Support team and they have confirmed it is an issue on their side. They are also working on a fix for this. Meanwhile, they have disabled refunds for us, which means if the changed subscription is not acknowledged, it wouldn't be revoked but the user would continue to use the same. Although, I am not sure if they have enabled this specific to our account or globally.

Update: Google has confirmed they have fixed the issue and it is available now. We have tested and verified the same and it works.

Promiscuity answered 28/4, 2020 at 11:13 Comment(0)
V
2

If you're implementing Purchase.Subscription:Acknowledge the Purchase object now includes an isAcknowledged() method that indicates whether a purchase has been acknowledged. In addition, the server-side API now includes acknowledgement boolean values for Product.purchases.get() and Product.subscriptions.get(). Before acknowledging a purchase, be sure to use these methods to determine if the purchase has already been acknowledged.

How to integrate this is mentioned here

Have a look at links below, these might give you more information on this.

https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/acknowledge

https://developers.google.com/android-publisher/api-ref/purchases/subscriptions/get

Vallonia answered 28/11, 2019 at 14:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.