I have two consumable items registered in AppStoreConnect. For the purposes of this question, we will tentatively refer to them as item_1 and item_2.
After purchasing item_1 via iOS billing, the receipt received will naturally contain the billing information for item_1. (Receipt json is partially omitted)
{
"receipt": {
"receipt_type": "ProductionSandbox",
"original_purchase_date_ms": "1375340400000",
......
"in_app": [
{
"quantity": "1",
"product_id": "item_1", // The information of the purchased item_1 is included in the receipt
"transaction_id": "2000000388593394",
"original_transaction_id": "2000000388593394",
"purchase_date": "2023-08-11 14:35:47 Etc/GMT",
"purchase_date_ms": "1691764547000",
"purchase_date_pst": "2023-08-11 07:35:47 America/Los_Angeles",
"original_purchase_date": "2023-08-11 14:35:47 Etc/GMT",
"original_purchase_date_ms": "1691764547000",
"original_purchase_date_pst": "2023-08-11 07:35:47 America/Los_Angeles",
"is_trial_period": "false",
"in_app_ownership_type": "PURCHASED"
}
]
},
"latest_receipt":"xxxxx",
"environment": "Sandbox",
"status": 0
}
If item_2 is subsequently purchased, item_1 information disappears from the receipt received from the iOS SDK, and only item_2 information is recorded.
{
"receipt": {
"receipt_type": "ProductionSandbox",
"original_purchase_date_ms": "1375340400000",
...
"in_app": [
{
"quantity": "1",
"product_id": "item_2", // The information on item_1 that I just purchased is missing!
"transaction_id": "2000000388601467",
"original_transaction_id": "2000000388601467",
"purchase_date": "2023-08-11 14:42:26 Etc/GMT",
"purchase_date_ms": "1691764946000",
"purchase_date_pst": "2023-08-11 07:42:26 America/Los_Angeles",
"original_purchase_date": "2023-08-11 14:42:26 Etc/GMT",
"original_purchase_date_ms": "1691764946000",
"original_purchase_date_pst": "2023-08-11 07:42:26 America/Los_Angeles",
"is_trial_period": "false",
"in_app_ownership_type": "PURCHASED"
}
]
},
"environment": "Sandbox",
"latest_receipt": "xxxxxx",
"status": 0
}
Is this normal behavior? Or is this a faulty condition in the Sandbox environment?
We are using flutter's in_app_purchase library. We have confirmed that the device can be reproduced on multiple IOS16 series devices on the actual device.