transaction_id
A unique identifier for a transaction, such as a purchase, restore, or renewal.
Declaration
string transaction_idDiscussion
This field is returned in the JSON response, in the responseBody.Latest_receipt_info and responseBody.Receipt.In_app arrays.
This value has the same format as the transaction’s transactionIdentifier property; however, the values may not be the same.
You can use this value to:
Manage subscribers in your account database. Store the
transaction_id,original_transaction_id, andproduct_idfor each transaction, as a best practice to store transaction records for each customer. App Store generates a new value fortransaction_idevery time the subscription automatically renews or is restored on a new device.Differentiate a purchase transaction from a restore or a renewal transaction. In a purchase transaction, the
transaction_idalways matches theoriginal_transaction_id. For subscriptions, it indicates the first subscription purchase. For a restore or renewal, thetransaction_iddoes not match theoriginal_transaction_id. If a user restores or renews the same purchase multiple times, each restore or renewal has a differenttransaction_id.