<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "ExternalPurchaseServerAPI",
  "identifier" : "/documentation/ExternalPurchaseServerAPI/referenceLineItemId",
  "metadataVersion" : "0.1.0",
  "role" : "Type",
  "symbol" : {
    "kind" : "Type",
    "modules" : [
      "External Purchase Server API"
    ],
    "preciseIdentifier" : "data:external_purchase_server_api:referenceLineItemId"
  },
  "title" : "referenceLineItemId"
}
-->

# referenceLineItemId

The line item identifier of another transaction, that the report  references.

```
string referenceLineItemId
```

## Discussion

Maximum length: 128

Use the `referenceLineItemId` field when reporting a transaction that needs to reference a previous transaction.

You report a transaction as a line item, which has a unique [`lineItemId`](/documentation/ExternalPurchaseServerAPI/lineItemId). Use the original `lineItemId` as the `referenceLineItemId` to report the following types of new transactions:

- Refunds, which refer to the original transaction to which the refund applies
- Subscription events such as renewals, which refer to the initial buy transaction.

Line items include [`OneTimeBuyLineItem`](/documentation/ExternalPurchaseServerAPI/OneTimeBuyLineItem),[`RefundLineItem`](/documentation/ExternalPurchaseServerAPI/RefundLineItem), and [`SubscriptionBuyLineItem`](/documentation/ExternalPurchaseServerAPI/SubscriptionBuyLineItem).

A [`referenceLineItemId`](/documentation/ExternalPurchaseServerAPI/referenceLineItemId) is valid when it references a line item in the same report, or in a report you previously submitted, successfully.

---

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)