latest_receipt_info and latest_receipt etc missing in the response of verifyReceipt

Hello,

In my production environment, I met this case serval times when my server tries to verify the subscription status with app server via

https://buy.itunes.apple.com/verifyReceipt

For example:

My server got a notification from apple server

{
   "latest_receipt":"xxxxxxxx=",
   "latest_receipt_info":{
      "original_purchase_date_pst":"2020-02-21 12:36:30 America/Los_Angeles",
      "quantity":"1",
      "subscription_group_identifier":"202***5",
      "unique_vendor_identifier":"E1xxxxxxxxxxEC",
      "original_purchase_date_ms":"1582317390000",
      "expires_date_formatted":"2020-03-21 19:36:28 Etc/GMT",
      "is_in_intro_offer_period":"false",
      "purchase_date_ms":"1582317388000",
      "expires_date_formatted_pst":"2020-03-21 12:36:28 America/Los_Angeles",
      "is_trial_period":"false",
      "item_id":"1031***040",
      "unique_identifier":"00xxxxxx-00xxxxxxxx02E",
      "original_transaction_id":"47xxxxxxx8715",
      "expires_date":"1584819388000",
      "app_item_id":"95***346",
      "transaction_id":"47xxxxxxxxx8715",
      "bvrs":"2254",
      "web_order_line_item_id":"4700xxxx175298",
      "version_external_identifier":"834***361",
      "bid":"com.xxxxxxxxxxxxxxxxxos",
      "product_id":"ixxxxxxxxxxxxxxx9",
      "purchase_date":"2020-02-21 20:36:28 Etc/GMT",
      "purchase_date_pst":"2020-02-21 12:36:28 America/Los_Angeles",
      "original_purchase_date":"2020-02-21 20:36:30 Etc/GMT"
   },
   "environment":"PROD",
   "auto_renew_status":"true",
   "unified_receipt":{
      "latest_receipt":"MIxxxxxxxxxxxxxxxxxxxxxxzHg==",
      "pending_renewal_info":[
         {
            "original_transaction_id":"47xxxxxxxxxx8715",
            "product_id":"ixxxxxxxxxxxxxx9",
            "auto_renew_status":"1",
            "auto_renew_product_id":"ixxxxxxxxxxxxxxx9"
         }
      ],
      "environment":"Production",
      "status":0,
      "latest_receipt_info":[
         {
            "expires_date_pst":"2020-03-21 12:36:28 America/Los_Angeles",
            "purchase_date":"2020-02-21 20:36:28 Etc/GMT",
            "purchase_date_ms":"1582317388000",
            "original_purchase_date_ms":"1582317390000",
            "transaction_id":"47xxxxxxx8715",
            "original_transaction_id":"47xxxxxxx8715",
            "quantity":"1",
            "expires_date_ms":"1584819388000",
            "original_purchase_date_pst":"2020-02-21 12:36:30 America/Los_Angeles",
            "product_id":"ixxxxxxxxxx9",
            "subscription_group_identifier":"2xx36295",
            "web_order_line_item_id":"4700***1175298",
            "expires_date":"2020-03-21 19:36:28 Etc/GMT",
            "is_in_intro_offer_period":"false",
            "original_purchase_date":"2020-02-21 20:36:30 Etc/GMT",
            "purchase_date_pst":"2020-02-21 12:36:28 America/Los_Angeles",
            "is_trial_period":"false"
         }
      ]
   },
   "password":"xxxxx",
   "auto_renew_product_id":"ipxxxxxxxx9",
   "notification_type":"INITIAL_BUY"
}

but when I tried to verify the subscription via the API https://buy.itunes.apple.com/verifyReceipt 3 days later

I got a response like below:

{
   "receipt":{
      "receipt_type":"Production",
      "adam_id":951***346,
      "app_item_id":951***346,
      "bundle_id":"com.mmguardian.childapp.ios",
      "application_version":"2254",
      "download_id":8705***09772361,
      "version_external_identifier":83***1361,
      "receipt_creation_date":"2020-02-21 20:33:30 Etc/GMT",
      "receipt_creation_date_ms":"1582317210000",
      "receipt_creation_date_pst":"2020-02-21 12:33:30 America/Los_Angeles",
      "request_date":"2020-02-24 23:25:22 Etc/GMT",
      "request_date_ms":"1582586722270",
      "request_date_pst":"2020-02-24 15:25:22 America/Los_Angeles",
      "original_purchase_date":"2020-02-06 23:42:51 Etc/GMT",
      "original_purchase_date_ms":"1581032571000",
      "original_purchase_date_pst":"2020-02-06 15:42:51 America/Los_Angeles",
      "original_application_version":"2240",
      "in_app":[


      ]
   },
   "status":0,
   "environment":"Production"
}

I am confusing about 2 things:

1. There is no "latest_receipt_info" or "latest_receipt" in the response, what's this case mean? Did the customer really pay for his subscription or for some reason, the customer could not make the subscription successfully.

2.About the "original_purchase_date", we can see that from the notification, "original_purchase_date" is "2020-02-21 20:36:30 Etc/GMT",

but in the response of the verifyReceipt API, "original_purchase_date" turned to "2020-02-06 23:42:51 Etc/GMT", while "receipt_creation_date" is "2020-02-21 20:33:30 Etc/GMT", which is not make sense.

This problem has bothered me for a long time, thanks in advance.

Replies

>when I tried to verify the subscription

What exactly did you use to verify the subscription? Are you certain the two are related?


The first receipt is for a single IAP transaction on 2020-02-21 12:36:28 that will expire one month later.


The second receipt is for a user who purchased no IAPs but purchased the app on 2020-02-06.

That second receipt was created on 2020-02-21 12:33:30 - three minutes before the first receipt purchased an IAP.

The second receipt could have been created by a user who caused a refresh receipt or who installed the app on a new device on 2020-02-21


All described here:

https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW3

The user may have two devices.