<!--
{
  "availability" : [
    "App Store Receipts: 1.0.0 - 1.7.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppStoreReceipts",
  "identifier" : "/documentation/AppStoreReceipts/original_transaction_id",
  "metadataVersion" : "0.1.0",
  "role" : "Type",
  "symbol" : {
    "kind" : "Type",
    "modules" : [
      "App Store Receipts"
    ],
    "preciseIdentifier" : "data:store_receipts:original_transaction_id"
  },
  "title" : "original_transaction_id"
}
-->

# original_transaction_id

The transaction identifier of the original purchase.

```
string original_transaction_id
```

## Discussion

This field is returned in the JSON response, in the [`responseBody.Pending_renewal_info`](/documentation/AppStoreReceipts/responseBody/Pending_renewal_info-data.dictionary), [`responseBody.Latest_receipt_info`](/documentation/AppStoreReceipts/responseBody/Latest_receipt_info-data.dictionary), and [`responseBody.Receipt.In_app`](/documentation/AppStoreReceipts/responseBody/Receipt-data.dictionary/In_app-data.dictionary) arrays.

This value is identical to the [`transaction_id`](/documentation/AppStoreReceipts/transaction_id) except when the user restores a purchase or renews a subscription. This value has the same format as the transaction’s `transactionIdentifier` property; however, the values may not be the same. For auto-renewable subscription transactions, this value also appears in the `pending_renewal_info` key of the JSON response.

You can use this value to:

- Match a transaction found in the receipt to a server-to-server notification event. For more information, see <doc://com.apple.documentation/documentation/StoreKit/enabling-app-store-server-notifications>.
- Manage auto-renewable subscriptions. Store this value, `product_id`, `expires_date_ms`, and `purchase_date_ms` for each transaction for each customer, as a best practice.
- Identify a subscription with the `product_id` in the `pending_renewal_info` section. Do not rely on the `original_transaction_id` value on its own. Treat this purchase as a new subscription when you see a new `original_transaction_id` value for a `product_id`.
- Differentiate a purchase transaction from a restore or a renewal transaction. In a purchase transaction, the `transaction_id` always matches the `original_transaction_id`. For subscriptions, it indicates the first subscription purchase. For a restore or renewal, the `transaction_id` does not match the `original_transaction_id`.
- Identify one or more renewals for the same subscription.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)