According to Apple documentation, to identify the transaction, productId and relevant dates, we should "Find the most-recent transaction for the product_id in the unified_receipt.latest_receipt_info".
My question is how do I find out the product_id? My app has multiple consumable in-app-purchases.
One option I was exploring was to [locally receipt validate]2 the receipt blob in the responseBody.unified_receipt.latest_receipt field. But I need the identifierForVendorId for that, and the identifierForVendorId isn't sent in the request.
I am not mentioning remote receipt validation because Apple has clearly stated in the documentation that "Refunded transactions are not present in the JSON response when you call the verifyReceipt endpoint with a receipt that contains refunded transactions, except for auto-renewable subscriptions.".
Thank you! Looking forward to hear how others have implemented refunds for their non-subscription products.
identifierForVendor
? The product ids are your product ids. You should know what they are. – Fencesitter