In apple’s document: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/handling_refund_notifications
memtion in document: Your server is responsible to parse and interpret all notifications from App Store Server. For the REFUND notification, identify the specific transaction, product ID, and relevant dates from the response:
Find the most-recent transaction for the product_id in the unified_receipt.latest_receipt_info by checking the purchase_date to select the most-recent transaction.
The date when App Store issued the refund is in the cancellation_date_ms field for this transaction.
- My problem is that , we find that unified_receipt.latest_receipt_info is an array, It contains multiple trasactions and these t'rascations all have ”cancellation_date_ms“ field .
I would like to know if I should process all the trasactions have field ”cancellation_date_ms“ or just the latest one?
please help!!
For this reason I would recommend using the v2 Server Notifications as those notifications will only contain the transaction for the event. But typically for v1 notifications for a type of REFUND or CANCEL, it is recommended to sort transactions by cancellation_date, typically there will be a transaction with a cancellation date near when the notification was first sent.