Get Refund History
Get a paginated list of all of a customer’s refunded in-app purchases for your app.
URL
GET https://api.storekit.apple.com/inApps/v2/refund/lookup/{anyTransactionId}Sandbox URL
GET https://api.storekit-sandbox.apple.com/inApps/v2/refund/lookup/{anyTransactionId}Path Parameters
| Name | Type | Description |
|---|---|---|
anyTransactionId Required | anyTransactionId | Any originalTransactionId, transactionId or appTransactionId that belongs to the customer for your app. |
Query Parameters
| Name | Type | Description |
|---|---|---|
revision Optional | revision | A token you provide to get the next set of up to 20 transactions. All responses include a You can store the The |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | RefundHistoryResponse | Request succeeded. |
| 400 | Bad Request Content-Type: application/json | (InvalidTransactionIdError | InvalidRequestRevisionError) | Invalid request. Check the specific error message for further information. |
| 401 | Unauthorized | The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests. | |
| 404 | Not Found Content-Type: application/json | TransactionIdNotFoundError | Invalid request. Check the specific error message for further information. |
| 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 get the customer’s complete refund history for your app by providing the transaction identifier (transactionId) for any of the customer’s in-app purchases. Each response (RefundHistoryResponse) contains a maximum of 20 refunded transactions. If the hasMore property in the response is true, call the endpoint again using the revision token from the response to get the next set of refunded transactions.
The response only includes App Store-approved refunds for any product type: consumable, non-consumable, auto-renewable subscriptions, and non-renewing subscriptions. For more information about product types, see In-app purchase.
The information in the response is the same as the information in one or more REFUND notifications (notificationType) from App Store Server Notifications. Use this API to retrieve any refund notifications you may have missed, such as during a server outage.
A successful response may have an empty signedTransactions array if the customer hasn’t received any App Store-approved refunds. To identify the date and reason code for a refund, see revocationDate and revocationReason in the JWSTransactionDecodedPayload.
The App Store Server API returns information based on the customer’s in-app purchase history regardless of whether the customer installs, removes, or reinstalls the app on their devices.
To get a customer’s full refund history for your app, start by calling the endpoint without any query parameters, as follows:
GET https://api.storekit.apple.com/inApps/v2/refund/lookup/{anyTransactionId}For subsequent requests, include the revision token from the previous RefundHistoryResponse.
GET https://api.storekit.apple.com/inApps/v2/refund/lookup/{anyTransactionId}?revision={revision}