Take the 2-minute tour ×

I try to understand the receipt information obtained from iTunes server, but could not find relevant documentation.

Particularly, what's the difference among unique_identifier, unique_vendor_identifier, original_transaction_id (which is claimed, in a WWDC'12 session, to be a de facto customer id) and [[[UIDevice currentDevice] identifierForVendor] UUIDString]?


I wish to store this receipt information on my server to track subscription validity. So it is better to know which id I should use as a surrogate for user identity.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Your software should only rely on the fields that Apple describes in their documentation. They could remove unique_identifier or unique_vendor_identifier, change their meaning, or change their values at any time without telling you about it.

You should follow Apple's documentation in regard to verifying subscription receipts using Apple's servers before your server transmits the sbuscription content to the device.

share|improve this answer
+1 Thanks for your suggestion. It makes a lot of sense. (I will seek a second opinion for a while before accepting yours as the answer.) –  ToyHunter Mar 6 '13 at 19:05
That's fine. Someone else may do it the way you want to do it and can offer their advice, or perhaps have more specific suggestions. –  Fls'Zen Mar 6 '13 at 19:07
add comment

You shouldn't attempt to parse the receipt directly:

On iOS, the contents and format of the store receipt is private and subject to change. Your application should not attempt to parse the receipt data directly. Use the mechanism described here to validate the receipt and retrieve the information stored inside it.


Instead, use properties of SKPaymentTransaction. For new purchases, use transactionIdentifier and transactionDate. For restores, use originalTransaction.transactionIdentifier and originalTransaction.transactionDate. This maintains continuity across restores and matches receipts to a specific transaction (and thus a specific user).

share|improve this answer
Your suggestion is reasonable, too. But, without parsing receipt info directly, I just wonder how I can get information like purchase-date from SKPaymentTransaction which seems to offer only transactionDate. –  ToyHunter Mar 7 '13 at 5:48
I'd guess you could use transactionDate and originalTransaction.transactionDate. –  Carl Veazey Mar 8 '13 at 5:49
I see! Thanks, Carl. –  ToyHunter Mar 8 '13 at 7:25
You're welcome glad to help! –  Carl Veazey Mar 11 '13 at 3:05
add comment

In Verifying Store Receipts there is a nice table that gives the fields that seemingly one can rely on in a receipt. That specific method does rely on connecting with Apple's server. Another description (though less readable) of the receipt fields is in Receipt Fields.

share|improve this answer
add comment

Your Answer


