Validating App Store Receipts without verifyReceipt
Blog post from RevenueCat
App Store receipts, introduced as an alternative to the SKPaymentQueue in iOS 7, provide a comprehensive snapshot of a user's in-app purchase (IAP) history and serve as the source of truth for developers. Although traditionally treated as mere tokens for server-side validation, these receipts contain detailed transaction information encoded using ASN.1 within a PKCS#7 container, secured through Apple's cryptographic signature process. Developers can extract and validate receipt contents using Apple's public documentation and cryptographic tools, bypassing the need for server-side validation via Apple's /verifyReceipt endpoint. However, the process is complex and prone to errors, lacking access to certain subscription-related fields like latest_receipt_info and pending_renewal_info, which could necessitate updates without recent receipts. Due to these challenges and potential security risks, it is recommended to use Apple's validation service or third-party solutions like RevenueCat to manage subscriptions effectively.