Google Play Billing (testing mode): why my purchase is automatically canceled
Asked Answered
W

3

15

I followed all the best practices from Google Developer Doc: https://developer.android.com/google/play/billing/billing_library_overview

I push my App in Beta test mode. All works perfectly, except at each time I do in-app (or subscription) purchase, I receive an email (purchase confirmation, OK), then 5-6 minutes later I receive another email (always from Google) to inform my purchase has been canceled...

I don't want an automatic cancel. Why this process?

Thank you very much guys!

Woald answered 10/9, 2019 at 11:29 Comment(0)
D
8

Because you are in testing mode so Subscription will be automatically renewed after 5 minutes. If you have disabled Auto-renewal, it will not renew. From my point of view, the auto cancellation will help you testing the subscription flow so it doesn't make sense to disable it.

While making the purchase in test mode, you will see something like $12/5 minute in the top right corner of bottom sheet from Google Play IAP. for more information and detailed guide about IAP you can always visit the Official Docs for Google IAP.

Dibbrun answered 10/9, 2019 at 11:34 Comment(11)
Hi Kiran! Thanks and for in-app purchase the behavior is the same (testing mode so automatic cancel)?Woald
Yes, don't worry. You did it correctly. it's normal behavior, Google Play IAP expires in 5 minutes in testing mode, If you are a beta tester or closed track(alpha tester). You will face that behavior. It improves testing capability. It's same for Subscription and In-app products.Dibbrun
@KiranManiya I was looking for the exact problem and thought its my mistake.!!Incrust
@RajeshJr. Happens, Docs may not contain important details sometimes.Dibbrun
> If you have disabled Auto-renewal how?Andreaandreana
@KiranManiya interesting, so it is normal behavior that the subscription automatically gets expired before it automatically gets renewed? I have this problem... https://mcmap.net/q/824238/-google-billing-api-shortly-after-subscription-purchase-subscription-expired-is-triggered-directly-followed-by-subscription-renewed/13558952Searcy
@Searcy absolutely. This is normal behaviour in the test mode subscription.Dibbrun
Thanks a lot for checking. That problem drove me crazy. Is there anything in the official documentation regarding the automatic expiration?Searcy
No. But it makes sense that the subscription expires in few minutes so that you can test the after expiration flow faster.Dibbrun
So, does it mean the subscriptions will not be automatically cancelled on production? My subscription is setup to autorenewal, and I expected it to auto renew every 5 minutes during tests, and to auto renew every month in the case of montly subscriptions. I don't have to worry about this then?Rood
In Production, the Subscription will only be canceled if the user takes action to cancel it.Dibbrun
T
8

Check out this doc

You have to call billingClient.acknowledgePurchase() method when you get purchase.purchaseState === Purchase.PurchaseState.PURCHASED on onPurchasesUpdated callback, otherwise your purchased will be automatically refunded/cancelled.

Further reference

Titos answered 1/6, 2020 at 7:34 Comment(1)
Just FYI, it takes 3 days to initiate the refund if the app hasn't acknowledged the purchase. If the cancellation process begins in an hour (in most cases it takes exactly 30 minutes or less than 5 minutes) then the reason is something else. Don't ask me, I am as frustrated as you are. Refer this thread for more info - #41726560Debunk
C
4

According to Google doc, Subscription ends after 6 renewals.

See this table for more info.

enter image description here

You can see full details by clicking above link and go to Test Cases section and click on SHOW/HIDE button.

Carmacarmack answered 22/2, 2021 at 13:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.