androidin-app-purchasein-app-billingacknowledgepurchase

How does AcknowledgePurchase really work on Android?


From the documentation located here: https://developer.android.com/google/play/billing/billing_library_overview

I see that I need to AcknowledgePurchase on my 1-time or consumable in-app purchases otherwise they will be canceled.

I was not aware of this at first and as I am manually managing in-app purchases by not consuming them until necessary.

It is working nicely but as now I noticed this AcknowledgePurchase method, I am worried; will all the purchases be canceled eventually? I checked the developer console and all items still show up as "Charged" even if more than 3 days has been passed. What is going on here? Will Google cancel them soon or is this something else?

(Note, releated to how and why I manage my in-apps in this way: Assume that you have a diamond which will only be consumed serverside when certain condition occurs, until that moment, user can restore their diamond in-app item and when and if I consume it, they can repurchase it. So, Google still keeps purchase info and I do not have to force the user to signup on my servers to be able to sync their purchase with their account)


Solution

  • This requirement is new in the Play Billing Library 2.0. For libraries before this, Google will auto-acknowledge purchases for you.

    If you are using Play Billing Library 2.0, then any purchase must be consumed or acknowledged within 3 days of the purchase or else it will be auto-refunded.