2

I have an app that has (only) auto-renewable subscriptions:

https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html

I have a backend where I validate the receipt. I use the latest_receipt_info value from the validation result JSON structure returned by apple to enable user's subscription. Sometimes this JSON key exists but sometimes it is missing. Here's an example response where this key is missing:

{
    "status":0,
    "environment":"Sandbox",
    "receipt":{
        "download_id":0,
        "adam_id":0,
        "request_date":"2018-03-22 10:28:02 Etc/GMT",
        "app_item_id":0,
        "original_purchase_date_pst":"2013-08-01 00:00:00 America/Los_Angeles",
        "version_external_identifier":0,
        "receipt_creation_date":"2018-03-12 12:29:54 Etc/GMT",
        "in_app":[

        ],
        "original_purchase_date_ms":"1375340400000",
        "original_application_version":"1.0",
        "original_purchase_date":"2013-08-01 07:00:00 Etc/GMT",
        "request_date_ms":"1521714482146",
        "bundle_id":"my.App",
        "receipt_creation_date_pst":"2018-03-12 05:29:54 America/Los_Angeles",
        "application_version":"201824020001",
        "request_date_pst":"2018-03-22 03:28:02 America/Los_Angeles",
        "receipt_creation_date_ms":"1520857794000",
        "receipt_type":"ProductionSandbox"
    }
}

How should I handle this case? I need i.e. transaction_id, product_id fields in order to process the validated receipt.

Babken Vardanyan
  • 14,090
  • 13
  • 68
  • 87
  • What ever came of this? – Oded Ben Dov Aug 09 '21 at 10:07
  • I've started experiencing a large spike of cases this past month where the latest_receipt_info is missing. Hasn't happened to me before which sent me looking to see if anyone else had this issue. – mg87 Feb 26 '22 at 17:16

0 Answers0