Flutter In App Purchase, check for refund Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Flutter In App Purchase, check for refund without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I have a problem with refunds of my purchases. I query all past purchases when I start the app and check whether a InAppProduct was purchased or not.

final QueryPurchaseDetailsResponse purchaseResponse =
        await _connection.queryPastPurchases();

Now a purchase was refunded, but the purchase is still queried via the queryPastPurchases() method. Also the PurchaseDetails class does not have any information about the purchase being refunded.

Any idea how to handle this case ?

Information :

  • The refund was over 3 days ago
  • I use the latest version of the official InApp package
  • The purchase was made on an Android phone

Regards

Answer

It took me some time and some hints on github. The problem was that i was refunding the purchase but not revoking it. If you click on the refund button it opens a modal. In the modal there is a checkbox for revoking. Click the checkbox before submitting the refund!

Once the refund was made and you forgot to revoke it, it is not possible to revoke it afterwards.

In this case you have the following options :

  • contact the support

  • revoke it via api ( only possible if the api access was activated before the refund.).

We are here to answer your question about Flutter In App Purchase, check for refund - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji