Take a look at
func paymentQueue(_ queue: SKPaymentQueue, didRevokeEntitlementsForProductIdentifiers productIdentifiers: [String])
The docs say it has to do with family sharing, but I just tried it and got this callback when I opened StoreKitTest > Manage Transactions and refunded an IAP.
I do receipt validation on the device using this ASN1Decoder, which has kindly been made available on GitHub.
https://github.com/filom/ASN1Decoder
I loop through all the purchases in the receipt to determine the logic. Refunded items have their cancellationDate field set when a refund has occurred.
Topic:
App & System Services
SubTopic:
StoreKit
Tags: