I was wondering how to detect a refund, or any type of cancelation of an in-app purchase(not a subscription and not a consumable).
I\'m currently making my test and when
I do understand your concern regarding refunded items.
If you offer in-app products, you can use the Voided Purchases API to request a list of voided purchases for your in-app products. When a user requests a refund for in-app purchases, you can see what was purchased and take back the refunded digital goods from that user.
To protect you app from refund abuse please use the Protect your apps from refund abuse help guide, for the best practises in protecting your app’s in-app products.