Can we check if a user's In App Purchase has been refunded by Apple?

#710 · open · 1 comments

View on GitHub ↗

pniteshnoble

Situation: - User makes an IAP and is awarded some content, we store the users device id to ensure they can access this content whenever they want. - User decided they do not like the content, so they call Apple and get a refund. - User can still access the content, even though they have been refunded for their IAP Problem: We don't want the user to be able to access this content anymore. This could become a loophole that they would take advantage of. (unlock content, then get refunded and keep their access to said content) Question: Is there any way for us to check if a user has been refunded for an IAP with either their transactionId, transactionReceipt, or any other information we may have?

Comments

xhruso00

@pniteshnoble There is "cancellationDate" in the in-app receipt. Check if it's non nil. The library is checkin it for you automatically. Don't forget there are users who buy, refund and buy again. The library checks for this automatically. public class func verifyPurchase(productId: String, inReceipt receipt: ReceiptInfo) -> VerifyPurchaseResult { PROBLEM: Customer has outdated receipt after he contacted support for refund. You can only check the receipt online and check it. New receipt is generated with app update (old macOS/iOS; newer could have new mechanism).