ExternalPurchaseReport
The contents of an external purchase report for a single token.
Declaration
object ExternalPurchaseReportProperties
| Name | Type | Description |
|---|---|---|
requestIdentifier Required | requestIdentifier | A UUID that you generate to uniquely identify the report. |
externalPurchaseId Required | externalPurchaseId | The unique identifier of the external purchase token for which you submit the report. |
status Required | status | The status of the token that determines the information the report contains. |
lineItems | [*] | An array of line items that describe transactions or events associated with the token identified by the |
Mentioned in
Discussion
This object is the request body for the Send External Purchase Report endpoint. Populate this object with data about a single external purchase token that you’re reporting, including its transactions. The Retrieve External Purchase Report endpoint also returns this object when you request a report you previously successfully submitted.
The requestIdentifier field identifies the report. Generate a UUID for each report you send.
The externalPurchaseId field is the token’s identifier. To get that value, decode the external purchase token you receive in your app or on your website. For more information, see Receiving and decoding external purchase tokens.
The status field represents the token’s status, which you provide to indicate the report’s contents and whether it includes a lineItems array. The status value determines the type of report you send:
Use a
LINE_ITEMstatus to report a token with transactions that you list in thelineItemsarray. Use this status when a token has associated transactions, and to send corrections to previously submitted line items. For more information, see Reporting tokens with transactions.Use a
NO_LINE_ITEMstatus for a report of a token that didn’t result in any successful transactions. Don’t includelineItemsin the request with this status. For more information, see Reporting unrecognized and transactionless tokens.Use an
UNRECOGNIZED_TOKENstatus to report a token you receive in an App Store Server Notification, but that you don’t have recorded in your system. Don’t includelineItemsin the request with this status. For more information, see Reporting unrecognized and transactionless tokens.Use a
DUPLICATE_TOKENstatus to report aSERVICESorACQUISITIONtoken that you recognize, but which you aren’t using to report transactions because it’s a duplicate token. Don’t includelineItemsin the request with this status. For more information, see Reporting unrecognized and transactionless tokens.
You can also submit corrections to restate line items, or retract a previous submission. For more information, see Reporting corrections.
A line item represents each transaction for the token identified by the externalPurchaseId. There are three types of line items:
OneTimeBuyLineItem, for one-time charges
RefundLineItem, for refunds
SubscriptionBuyLineItem, for auto-renewable subscription events and transactions
Include as many line items as there are transactions that apply to the token. If your system completes new transactions after you successfully submit a report for a token, send a new report for the token with the new transactions.