14

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!

anthony
  • 7,653
  • 8
  • 49
  • 101

3 Answers3

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

Chintan Raghwani
  • 3,370
  • 4
  • 22
  • 33
  • 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 - https://stackoverflow.com/questions/41726060/order-cancelled-google-developer-console – Shunan Jul 29 '21 at 05:11
6

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.

Kiran Maniya
  • 8,453
  • 9
  • 58
  • 81
  • 1
    Hi Kiran! Thanks and for in-app purchase the behavior is the same (testing mode so automatic cancel)? – anthony Sep 10 '19 at 11:45
  • 1
    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`. – Kiran Maniya Sep 10 '19 at 12:14
  • @KiranManiya I was looking for the exact problem and thought its my mistake.!! – Rajesh Nov 24 '20 at 15:45
  • 1
    @RajeshJr. Happens, Docs may not contain important details sometimes. – Kiran Maniya Nov 25 '20 at 07:10
  • > `If you have disabled Auto-renewal ` how? – ilw Jan 18 '21 at 11:16
  • @KiranManiya interesting, so it is normal behavior that the subscription automatically gets expired before it automatically gets renewed? I have this problem... https://stackoverflow.com/q/66716996/13558952 – goldensoju Apr 06 '21 at 05:27
  • @goldensoju absolutely. This is normal behaviour in the test mode subscription. – Kiran Maniya Apr 06 '21 at 06:19
  • Thanks a lot for checking. That problem drove me crazy. Is there anything in the official documentation regarding the automatic expiration? – goldensoju Apr 06 '21 at 06:42
  • No. But it makes sense that the subscription expires in few minutes so that you can test the after expiration flow faster. – Kiran Maniya Apr 06 '21 at 07:33
  • 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? – Ulysses Alves Jun 21 '22 at 21:25
  • In Production, the Subscription will only be canceled if the user takes action to cancel it. – Kiran Maniya Jun 22 '22 at 09:27
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.

Chirag Savsani
  • 6,020
  • 4
  • 38
  • 74