I received the following validated receipt JSON (scrubbed of identifying and unimportant data) which clearly indicates a subscription upgrade. Upon purchasing the upgrade, the active subscription appears to have been cancelled. My sandbox receipts do not behave this way though, so I'm wondering if this a difference between enviornments, or if something else caused this situation and the active subscription cannot be relied upon to acquire a cancellation_date upon upgrade.
The first purchase is a 'basic.monthly' subscription. The second is a renewal of 'basic.monthly', but 9 days into the subscription, a 'premium.monthly' subscription is started, and the second 'basic.monthly' is cancelled (2 seconds after 'premium.monthly' is purchased).
Thoughts?
{
"status": 0,
"environment": "Production",
"receipt": {
"receipt_type": "Production",
"adam_id": 1,
"app_item_id": 1,
"bundle_id": "com.mycompany.myapp",
"application_version": "1.0",
"download_id": 1,
"version_external_identifier": 1,
"receipt_creation_date": "2017-11-16 21:21:00 Etc/GMT",
"request_date": "2018-02-05 23:04:17 Etc/GMT",
"original_purchase_date": "2017-03-09 19:28:19 Etc/GMT",
"original_application_version": "1",
"in_app": [...]
},
"latest_receipt_info": [
{
"quantity": "1",
"product_id": "com.mycompany.myapp.basic.monthly",
"transaction_id": "xxxxxxxxxx4808",
"original_transaction_id": "xxxxxxxxxx4808",
"purchase_date": "2017-03-14 01:48:41 Etc/GMT",
"original_purchase_date": "2017-03-14 01:48:41 Etc/GMT",
"expires_date": "2017-04-14 01:48:41 Etc/GMT",
"web_order_line_item_id": "xxxxxxxxxx9117",
},
{
"quantity": "1",
"product_id": "com.mycompany.myapp.basic.monthly",
"transaction_id": "xxxxxxxxxx4186",
"original_transaction_id": "xxxxxxxxxx4808",
"purchase_date": "2017-04-14 01:48:41 Etc/GMT",
"original_purchase_date": "2017-03-14 01:48:41 Etc/GMT",
"expires_date": "2017-05-14 01:48:41 Etc/GMT",
"web_order_line_item_id": "xxxxxxxxxx9118",
"cancellation_date": "2017-04-23 14:23:42 Etc/GMT",
"cancellation_reason": "0"
},
{
"quantity": "1",
"product_id": "com.mycompany.myapp.premium.monthly",
"transaction_id": "xxxxxxxxxx5089",
"original_transaction_id": "xxxxxxxxxx4808",
"purchase_date": "2017-04-23 14:23:40 Etc/GMT",
"original_purchase_date": "2017-03-14 01:48:41 Etc/GMT",
"expires_date": "2017-05-23 14:23:40 Etc/GMT",
"web_order_line_item_id": "xxxxxxxxxx9235",
},...
]
}