Look Up Order ID
Get a customer’s in-app purchases from a receipt using the order ID.
URL
GET https://api.storekit.apple.com/inApps/v1/lookup/{orderId}Path Parameters
| Name | Type | Description |
|---|---|---|
orderId Required | orderId | The order ID for in-app purchases that belong to the customer. |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | OrderLookupResponse | Request succeeded. |
| 400 | Bad Request Content-Type: application/json | GeneralBadRequestError | The request is invalid and can’t be accepted. |
| 401 | Unauthorized | The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests. | |
| 429 | Content-Type: application/json | RateLimitExceededError | The request exceeded the rate limit. |
| 500 | Internal Server Error Content-Type: application/json | (GeneralInternalError | GeneralInternalRetryableError) | Server error. Try again later. |
Mentioned in
Discussion
Call this endpoint to identify and validate a customer’s in-app purchases, based on their order ID.
When a customer contacts you for support, ask for their order ID and use that value to call this endpoint. Customers can retrieve their order IDs from their purchase history on the App Store; for more information, see See your purchase history for the App Store, iTunes store, and more. The App Store also sends customers an email receipt with an order ID each time they make in-app purchases.
A successful response with an OrderLookupStatus value of 0 contains an array of one or more signed transactions for the in-app purchase based on the order ID. Use the decoded transaction, JWSTransactionDecodedPayload, to identify information such as the productId and purchaseDate that you can use to provide customer support.
A response with an OrderLookupStatus value of 1 doesn’t contain a signed transactions array.
The App Store Server API returns information based on the customer’s in-app purchase history regardless of whether the customer installed, removed, or reinstalled the app on their devices.