0

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.

Fushihara
  • 341
  • 1
  • 3
  • 11
  • This is normal behaviour. Consumable purchases are not persisted in the receipt. It is your responsibility to record the purchase and track the consumption. – Paulw11 Aug 11 '23 at 20:39
  • Looking at my server logs from about a month ago, it appears that receipts sometimes contain both item_1 and item_2 at that time, is this a recent spec change? Or am I mistaken and the specification has always remained the same that only one consumable item remains on the receipt? – Fushihara Aug 12 '23 at 00:57
  • See the duplicate - it has been this way since at least 2016. – Paulw11 Aug 12 '23 at 04:22

0 Answers0