Undocumented field adam_id when verifying with AppStore

Hi,

Our subscriptions allow cross-platform access and we'd like to keep user subscriptions updated, even when the user doesn't use his iOS device.

I'm verifying the receipt on my serverside using the API at https://buy.itunes.apple.com/verifyReceipt (https://sandbox.itunes.apple.com/verifyReceipt).

but the field "adam_id" seems to be undocumented.


The reason I'm asking is, our server needs a way to uniquely identify a receipt (not its content, but whatever would be returned in "latest_receipt_info").


A signed receipt (like the ones used for iaps) could possibly work without a database, but currently Apple servers still need to do a database lookup on each call to attach the "latest_receipt" field. (Even in this case, a unique identifier would make sense)

So I don't quite understand why we don't simply get a unique token for the receipt and an API to query it using the token.



"status": 0,
"environment": "Sandbox",
"receipt": {
    "receipt_type": "ProductionSandbox",
    "adam_id": 0,
    "app_item_id": 0,
    "bundle_id": "com.bundle.redacted",
    "application_version": "1.1",
    "download_id": 0,
    "version_external_identifier": 0,
    "receipt_creation_date": "2017-04-12 09:20:06 Etc/GMT",
    "receipt_creation_date_ms": "1491988806000",
    "receipt_creation_date_pst": "2017-04-12 02:20:06 America/Los_Angeles",
    "request_date": "2017-04-12 09:21:59 Etc/GMT",
    "request_date_ms": "1491988919369",
    "request_date_pst": "2017-04-12 02:21:59 America/Los_Angeles",
    "original_purchase_date": "2013-08-01 07:00:00 Etc/GMT",
    "original_purchase_date_ms": "1375340400000",
    "original_purchase_date_pst": "2013-08-01 00:00:00 America/Los_Angeles",
    "original_application_version": "1.0",
    "in_app": [...]
},
"latest_receipt_info": [...],
"latest_receipt": "..."

You are asking 2 questions:


1) "adam_id is not documented"....so what. There are many fields in a receipt at various times that are not documented. You cannot rely on them - although some Apple Folks say you can. For example...."latest_receipt_info"!


2) "The reason I'm asking is, our server needs a way to uniquely identify a receipt (not its content, but whatever would be returned in "latest_receipt_info")." latest_receipt_info is not part of the receipt - it was added by the Apple servers to the receipt you sent them. So, you need to ask what you want to be 'unique' and what do you mean by 'unique'? The creation_date is the only field now a days that offers some uniqueness to the transaction receipt itself. If you are interested in differentiating purchases you can use the transaction_id of an individual IAP - each purchaser of the IAP, and each individual device owned by that user, will have a unique transaction_id. But that transaction_id will be in all of the receipts that that device sends to your server forevermore - over and over again.

Undocumented field adam_id when verifying with AppStore
 
 
Q