Different naming convention on date field in status update notification

The date field in `latest_receipt_info` is inconsitent.


For example, the two date fields: `expires_date` and `original_purchase_date`, the following's value with same format but different naming convention for the key:


`expires_date` => `original_purchase_date_ms`.

`expires_date_formatted` => `original_purchase_date`

`expires_date_formatted_pst` => `original_purchase_date_pst`


This is really confusing.


%{"auto_renew_product_id" => "io.example.pro",
  "auto_renew_status" => "true", "environment" => "Sandbox",
  "latest_receipt" => "RECEIPT",
  "latest_receipt_info" => %{"bid" => "io.example", "bvrs" => "41",
    "expires_date" => "1502767605000",
    "expires_date_formatted" => "2017-08-15 03:26:45 Etc/GMT",
    "expires_date_formatted_pst" => "2017-08-14 20:26:45 America/Los_Angeles",
    "item_id" => "1243267094",
    "original_purchase_date" => "2017-06-16 06:27:05 Etc/GMT",
    "original_purchase_date_ms" => "1497594425000",
    "original_purchase_date_pst" => "2017-06-15 23:27:05 America/Los_Angeles",
    "original_transaction_id" => "1000000307712301",
    "product_id" => "io.example.pro",
    "purchase_date" => "2017-08-15 03:21:45 Etc/GMT",
    "purchase_date_ms" => "1502767305000",
    "purchase_date_pst" => "2017-08-14 20:21:45 America/Los_Angeles",
    "quantity" => "1", "transaction_id" => "1000000324426003",
    "unique_identifier" => "becd78c1c419a7d75c128e5306762da1ac9c9cba",
    "unique_vendor_identifier" => "F8EACBA7-4637-4A49-929D-B30013F35D5F",
    "web_order_line_item_id" => "1000000035380472"},
  "notification_type" => "INTERACTIVE_RENEWAL",
  "password" => "PASSWORD"}

Replies

The two documented fields, purchase_date and original_purchase_date are in "RFC 3339" format as documented here:

https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW12


The other fields (except as noted below) are not documented and formated as you noted.


The surprise is the "expires_date_formatted" which should be labelled "expires_date"

and the "expires_date" which should be labelled "expires_date_ms".


Please report this bug.

Seeing the same exact issue here. The status update notification format seems to differ wildly from the receipt data received by the app itself during the subscription/payment flow. It's super surprising and frustrating that the receipt format differs so greatly.

This is true. I would actully expect that the fields like 'latest_receipt' and 'latest_receipt_info' would be exactly the same as the receipt data in the app. In the app, for example, latest_receipt_info is an array of purcheses, but in the status update notification format it is an object. The status update notification format is kind of the iOS6-style receipt format with its "bid" and "bvrs" fields.

Same issue here.


It's extremely frustrating that these 2 entities are different. And since this documentation https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW12 is now archived. I would expect the server-to-server notification to use this format: https://developer.apple.com/documentation/appstorereceipts/responsebody/latest_receipt_info aswel.


This is extremely frustrating, since you are recommending people to implement server-to-server notifications. https://developer.apple.com/videos/play/wwdc2019/302/


How are we supposed to do this when there is no consistency??