Contents

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

NameTypeDescription
anyTransactionId RequiredanyTransactionId

Any originalTransactionId, transactionId or appTransactionId that belongs to the customer for your app.

Query Parameters

NameTypeDescription
revision Optionalrevision

A token you provide to get the next set of up to 20 transactions. All responses include a revision token. Use the revision token from the previous RefundHistoryResponse.

You can store the revision token from the final results page and use it for a future call. For more information, see RefundHistoryResponse.

The revision token is required in all requests except the initial request.

Response Codes

StatusReasonTypeDescription
200OK
Content-Type: application/json
RefundHistoryResponse

Request succeeded.

400Bad Request
Content-Type: application/json
(InvalidTransactionIdError | InvalidRequestRevisionError)

Invalid request. Check the specific error message for further information.

401Unauthorized

The JSON Web Token (JWT) in the authorization header is invalid. For more information, see Generating JSON Web Tokens for API requests.

404Not 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.

500Internal 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}

See Also

Refund lookup