I did find this today:
if the receipt status is 21006 and there is a key named
cancellation_date, then it’s a cancellation, you can find the new
expiration date in that key but it’s a formatted date, if you need a
better value to parse check for
receipt['latest_expired_receipt_info']['cancellation_date_ms'] same as
expires_date
Notification of cancellation of auto-renewal for an in-app purchase
I've also now confirmed this in production. There's a cancellation_date_ms
property of latest_expired_receipt_info
and also in the root of the notification itself. cancellation_date
is a formatted date string.
Here's a partial production notification:
{
"environment": "PROD",
"auto_renew_status": "false",
"latest_expired_receipt_info": {
"original_purchase_date_pst": "2018-01-25 11:59:25 America/Los_Angeles",
"cancellation_date_ms": "1517150504000",
"cancellation_reason": "0",
"original_purchase_date_ms": "1516910365000",
"expires_date_formatted": "2019-01-25 19:59:23 Etc/GMT",
"is_in_intro_offer_period": "false",
"purchase_date_ms": "1516910363000",
"expires_date_formatted_pst": "2019-01-25 11:59:23 America/Los_Angeles",
"is_trial_period": "false",
"expires_date": "1548446363000",
"cancellation_date": "2018-01-28 14:41:44 Etc/GMT",
"purchase_date": "2018-01-25 19:59:23 Etc/GMT",
"cancellation_date_pst": "2018-01-28 06:41:44 America/Los_Angeles",
"purchase_date_pst": "2018-01-25 11:59:23 America/Los_Angeles",
"original_purchase_date": "2018-01-25 19:59:25 Etc/GMT"
},
"cancellation_date_ms": "1517150504000"
}