Getting IAP's refunded, how to acknowledge user purchases? (Google Play)

Viewed 871

I've developed a Flutter app and published it to Google Play. I'm using in_app_purchase: ^0.3.4+5 and testing only on Android.

My issue is that I've had 3 non-consumable IAP's refunded, the only IAP's so far.

To implement IAP I followed this guide: https://fireship.io/lessons/flutter-inapp-purchases/

Which implements this medthod among others:

  Future<void> _getUserPastPurchases() async {
    QueryPurchaseDetailsResponse response = await _iap.queryPastPurchases();
    for (PurchaseDetails purchase in response.pastPurchases) {
      if (Platform.isIOS) {
        InAppPurchaseConnection.instance.completePurchase(purchase);
      }
    }
    setState(() {
      _purchases = response.pastPurchases;
    });
  }

The only line that sounds like some sort of purchase acknowledgment is this one:

InAppPurchaseConnection.instance.completePurchase(purchase);

But the guy in the video said that only iOS users need this. Also this method only fetches the users past purchases. Even so, is that the line I would need to implement after a successful purchase in order to acknowledge the user's purchase?

This is how I verify a purchase:

    PurchaseDetails purchase = _purchases.firstWhere((purchase) => purchase.productID == nChargeRemAds, orElse: () => null);
    if (purchase != null && purchase.status == PurchaseStatus.purchased) {
        // Purchase verified
        // Or is it? Do I need an extra step?
    }

In short, this is what I'm experiencing:

  1. User purchases my non-consumable IAP. At this point all goes well with flying colors and purchase appears in my Play Console.
  2. After 3 days a refund gets triggered for reasons that escape me right now (save for what I've researched so far and help I've asked for here).

This is NOT an issue of testing out refunds, said refunds were not initiated by myself or the users who've bought the IAP, I know the users, I asked to test it out on their phones.

Also, I read this from the Android docs:

Purchases must be acknowledged within three days

Note: This section describes a new requirement for acknowledging all purchases. If you are already consuming purchases via consumeAsync(), you do not need to make any further changes if you consume purchases within 3 days, as consumeAsync() automatically acknowledges a purchase. Failure to properly acknowledge purchases will result in purchases being refunded.

Note: This requirement applies only to apps that use the Google Play Billing Library version 2.0 and newer. This requirement doesn't apply if you use an older version of the Google Play Billing Library, or if you use the AIDL API.

Taken from: https://developer.android.com/google/play/billing/release-notes

Please advise, this is very critical as our app is already on Google Play and I definitely didn't anticipate this to happen.

P.S. From reading my catlogs I see that this plugin attempts to use v3.0.

Thanks.

0 Answers
Related