Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why in app product purchase in Google Play is automatically refunded?

After updating the app billing lib to implementation 'com.android.billingclient:billing:2.0.1' I started to see refunds even after 3 days. How is that possible? Google only mentions here that purchse is refunded if user uninstall the app in short period after purchase. I guess 3 days is not a short period.

like image 398
Szymon Klimaszewski Avatar asked Jun 19 '19 06:06

Szymon Klimaszewski


People also ask

Is Google Play refund automatic?

Google Play refund policiesYou may get an automatic refund if you uninstall a paid app shortly after first buying it. If you want to reinstall the app, you'll have to buy it again and you may not be eligible for a refund on that purchase.

Will Google Play refund in app purchases?

Simply follow the steps below, and you should be able to get a refund no problem — as long as you are still within the 48-hour window for refunds through the Play Store. On any Android device linked to the account you made the purchase from, go to the Play Store page of the item you purchased and hit the Refund button.

Can I get a refund for an accidental app purchase?

Tap or click "I'd like to", then choose "Request a refund". Choose the reason why you want a refund, then choose Next. Choose the app, subscription or other item, then choose Submit.

How do I refund an accidental in app purchase on Google Play?

Step 1: Navigate to your Play Store account in your browser and sign in to your Google account (you may already be logged in). Step 2: Scroll down to Account in the left-hand menu and click Order History from the top menu. From here, search for the content you want to return. Step 3: Choose Request a Refund.


Video Answer


2 Answers

Users must acknowledge the purchase within 3 days otherwise the subscription will be refunded:

https://developer.android.com/google/play/billing/billing_library_overview#acknowledge

like image 55
user2190201 Avatar answered Nov 10 '22 07:11

user2190201


Do the following in PurchasesUpdatedListener

private val purchaseUpdateListener = PurchasesUpdatedListener { billingResult, purchases ->
for (purchase in purchases) {
    if (purchase.purchaseState == Purchase.PurchaseState.PURCHASED) {
        if (!purchase.isAcknowledged) {
                 val acknowledgePurchaseParams = 
                     AcknowledgePurchaseParams.newBuilder()
                     .setPurchaseToken(purchase.purchaseToken).build()

                 billingClient?.acknowledgePurchase(acknowledgePurchaseParams) { 
                     billingResult ->
                         val billingResponseCode = billingResult.responseCode
                         val billingDebugMessage = billingResult.debugMessage

                         Log.v("TAG_INAPP", "response code: $billingResponseCode")
                         Log.v("TAG_INAPP", "debugMessage : $billingDebugMessage")
                        }
         }
 }

This code will send confirmation of the purchase to the google servers. So any purchase made from your app won't be invalid anymore and won't be refunded automatically.

like image 40
Divyang M Avatar answered Nov 10 '22 07:11

Divyang M