Send External Purchase Report
Report required information about external purchase tokens and associated transactions.
URL
PUT https://api.storekit.apple.com/externalPurchase/v1/reportsSandbox URL
PUT https://api.storekit-sandbox.apple.com/externalPurchase/v1/reportsResponse Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | SendReportSuccessResponse | The report was received and passed validation checks successfully. |
| 400 | Bad Request Content-Type: application/json | SendReportErrorResponse | The report failed because the request was malformed, a duplicate request, or if the SendReportErrorResponse object is present that the line item validation failed. |
| 401 | Unauthorized | The JSON Web Token (JWT) in the authorization header is invalid. | |
| 429 | Rate limit exceeded. | ||
| 500 | Internal Server Error | Server error. Try again later. |
Mentioned in
Discussion
Call this endpoint to report an external purchase token that your app or website receives, and the transactions and events associated with the token. For information on the reporting requirements, see the Commission, transaction reports, and payments section of the article Using alternative payment options on the App Store in the European Union.
To send the report, add your data to the ExternalPurchaseReport request body. For more information about creating reports, see the following:
The server indicates it successfully received your report by returning an HTTP 200 response with your requestIdentifier in the SendReportSuccessResponse. If you receive an HTTP 400 error response with a SendReportErrorResponse object, the server didn’t successfully receive any of the data in the report. Fix the errors listed in the response object, and resubmit the full report using the same requestIdentifier. The server also sends an HTTP 400 error if the request is a duplicate, or if it’s malformed.
Testing in the sandbox environment
Call this endpoint using its sandbox URL only for tokens that the system generates in the sandbox environment. For more information about identifying sandbox tokens, see Receiving and decoding external purchase tokens.
HTTP Body
The request body that contains the report information.