---
title: App Store Server API
framework: appstoreserverapi
role: collection
role_heading: Web Service
path: appstoreserverapi
---

# App Store Server API

Manage your customers’ App Store transactions from your server.

## Mentioned in

Generating JSON Web Tokens for API requests Simplifying your implementation by using the App Store Server Library Creating API keys to authorize API requests

## Overview

Overview The App Store Server API is a REST API that you call from your server to request and provide information about your customers’ In-App Purchases. The App Store signs the transaction and subscription renewal information that this API returns using the JSON Web Signature (JWS) specification. Most endpoints return data for a single customer of your app, indicated by a transaction identifier that you provide. The App Store Server API is independent of the app’s installation status on the customers’ devices. The App Store server returns information based on a customer’s In-App Purchase history regardless of whether the customer installs, removes, or reinstalls the app on their devices. This API provides the following functionality: Transactions and auto-renewable subscription status. Get information for single transactions by calling Get Transaction Info or a customer’s entire transaction history using Get Transaction History. Call Get All Subscription Statuses for up-to-date subscription status. Use this information to keep your customers’ purchase information current on your server. Refund information. Call Get Refund History to get a customer’s refund history. Use the Send Consumption Information endpoint to send information to the App Store when customers request a refund for an In-App Purchase, after you receive the CONSUMPTION_REQUEST notificationType from App Store Server Notifications V2. Your data helps inform refund decisions. App Store Server Notifications history and testing. Call Get Notification History to request the notifications your server may have missed in the past 180 days (or 30 days in the sandbox environment). Call Request a Test Notification and Get Test Notification Status to test if your server is successfully receiving notifications at its App Store Server Notifications V2 endpoint. Subscription renewal date extensions. Call Extend a Subscription Renewal Date and related endpoints to compensate your customers for temporary service outages, canceled events, or interruptions to live-streamed events by extending the renewal date of their paid, active subscription. For more information, see Extending the renewal date for auto-renewable subscriptions. Order information lookup. Call Look Up Order ID to get In-App Purchase information based on a customer’s order ID, found on the App Store receipt that customers receive in email. App transaction information and setting an app account token. Call Get App Transaction Info to get details about the customer’s purchase of your app, such as the original purchase date and version. Use Set App Account Token to set an app account token when your customer makes an In-App Purchase outside your app, or to update its value. Your server must support the Transport Layer Security (TLS) protocol 1.2 or later to use the App Store Server API. Check the App Store Server API changelog to learn about the latest changes to this API. Look for videos about the App Store Server API on the Apple Developer website. Authorize your API calls Calls to the API require JSON Web Tokens (JWTs) for authorization; you obtain keys to create the tokens from your organization’s App Store Connect account. See Creating API keys to authorize API requests to create your keys. See Generating JSON Web Tokens for API requests to generate tokens using your keys, and send API requests. After you have a complete and signed token, provide the token in the request’s authorization header as a bearer token. Generate a new token for each new API request, or reuse tokens until they expire. Create JWTs, verify transactions, and more using the App Store Server Library The App Store Server Library is an open source library from Apple, available in four languages. It provides a client that make it easier to adopt the App Store Server APIs, including creating the JWTs to authorize calls. For more information, see Simplifying your implementation by using the App Store Server Library and the WWDC23 session Meet the App Store Server Library. Test using the sandbox environment All App Store Server API endpoints are available for testing in the sandbox environment, except Look Up Order ID. Access the sandbox environment by sending requests to the endpoints using the following base URL: https://api.storekit-sandbox.apple.com/ For example, to call Get Transaction History in the sandbox environment, send a request using the sandbox URL: https://api.storekit-sandbox.apple.com/inApps/v2/history/{anyTransactionId} Note that /inApps in the path is case-sensitive. For endpoints that take a transactionId as a parameter, be sure to call the endpoint using the same environment that creates the transaction identifier. Environment information is present in the environment property of the JWSTransactionDecodedPayload. If you don’t have environment information, follow these steps: Call the endpoint using the production URL. If the call succeeds, the transaction identifier belongs to the production environment. If you receive an error code 4040010 TransactionIdNotFoundError, call the endpoint using the sandbox environment. If the call succeeds, the transaction identifier belongs to the sandbox environment. If the call fails with the 4040010 error code, the transaction identifier isn’t present in either environment.

## Topics

### Essentials

- [Simplifying your implementation by using the App Store Server Library](appstoreserverapi/simplifying-your-implementation-by-using-the-app-store-server-library.md)
- [Creating API keys to authorize API requests](appstoreserverapi/creating-api-keys-to-authorize-api-requests.md)
- [Generating JSON Web Tokens for API requests](appstoreserverapi/generating-json-web-tokens-for-api-requests.md)
- [Identifying rate limits](appstoreserverapi/identifying-rate-limits.md)
- [App Store Server API changelog](appstoreserverapi/app-store-server-api-changelog.md)

### In-App Purchase history

- [Get Transaction History](appstoreserverapi/get-transaction-history.md)
- [HistoryResponse](appstoreserverapi/historyresponse.md)

### Transaction information

- [Get Transaction Info](appstoreserverapi/get-transaction-info.md)
- [TransactionInfoResponse](appstoreserverapi/transactioninforesponse.md)

### App Transaction information

- [Get App Transaction Info](appstoreserverapi/get-app-transaction-info.md)
- [AppTransactionInfoResponse](appstoreserverapi/apptransactioninforesponse.md)

### Subscription status

- [Get All Subscription Statuses](appstoreserverapi/get-all-subscription-statuses.md)
- [StatusResponse](appstoreserverapi/statusresponse.md)

### App Account Token

- [Set App Account Token](appstoreserverapi/set-app-account-token.md)
- [UpdateAppAccountTokenRequest](appstoreserverapi/updateappaccounttokenrequest.md)

### Order ID lookup

- [Look Up Order ID](appstoreserverapi/look-up-order-id.md)
- [orderId](appstoreserverapi/orderid.md)
- [OrderLookupResponse](appstoreserverapi/orderlookupresponse.md)

### Finishing transactions

- [Finish Transaction](appstoreserverapi/finish-transaction.md)

### Consumption information

- [Send Consumption Information](appstoreserverapi/send-consumption-information.md)
- [ConsumptionRequest](appstoreserverapi/consumptionrequest.md)

### Refund lookup

- [Get Refund History](appstoreserverapi/get-refund-history.md)
- [RefundHistoryResponse](appstoreserverapi/refundhistoryresponse.md)

### Subscription-renewal-date extension

- [Extending the renewal date for auto-renewable subscriptions](appstoreserverapi/extending-the-renewal-date-for-auto-renewable-subscriptions.md)
- [Extend a Subscription Renewal Date](appstoreserverapi/extend-a-subscription-renewal-date.md)
- [Extend Subscription Renewal Dates for All Active Subscribers](appstoreserverapi/extend-subscription-renewal-dates-for-all-active-subscribers.md)
- [Get Status of Subscription Renewal Date Extensions](appstoreserverapi/get-status-of-subscription-renewal-date-extensions.md)
- [ExtendRenewalDateRequest](appstoreserverapi/extendrenewaldaterequest.md)
- [ExtendRenewalDateResponse](appstoreserverapi/extendrenewaldateresponse.md)
- [MassExtendRenewalDateRequest](appstoreserverapi/massextendrenewaldaterequest.md)
- [MassExtendRenewalDateResponse](appstoreserverapi/massextendrenewaldateresponse.md)
- [MassExtendRenewalDateStatusResponse](appstoreserverapi/massextendrenewaldatestatusresponse.md)

### App Store Server Notifications history

- [Get Notification History](appstoreserverapi/get-notification-history.md)
- [NotificationHistoryRequest](appstoreserverapi/notificationhistoryrequest.md)
- [NotificationHistoryResponse](appstoreserverapi/notificationhistoryresponse.md)
- [notificationHistoryResponseItem](appstoreserverapi/notificationhistoryresponseitem.md)

### App Store Server Notifications testing

- [Request a Test Notification](appstoreserverapi/request-a-test-notification.md)
- [Get Test Notification Status](appstoreserverapi/get-test-notification-status.md)
- [SendTestNotificationResponse](appstoreserverapi/sendtestnotificationresponse.md)
- [CheckTestNotificationResponse](appstoreserverapi/checktestnotificationresponse.md)

### JWS headers and payloads

- [JWSDecodedHeader](appstoreserverapi/jwsdecodedheader.md)
- [JWSAppTransaction](appstoreserverapi/jwsapptransaction.md)
- [JWSAppTransactionDecodedPayload](appstoreserverapi/jwsapptransactiondecodedpayload.md)
- [JWSTransaction](appstoreserverapi/jwstransaction.md)
- [JWSTransactionDecodedPayload](appstoreserverapi/jwstransactiondecodedpayload.md)
- [JWSRenewalInfo](appstoreserverapi/jwsrenewalinfo.md)
- [JWSRenewalInfoDecodedPayload](appstoreserverapi/jwsrenewalinfodecodedpayload.md)
- [Data types](appstoreserverapi/data-types.md)

### Error information

- [Error codes](appstoreserverapi/error-codes.md)

### Deprecated

- [Get Transaction History V1](appstoreserverapi/get-transaction-history-v1.md)
- [Get Refund History V1](appstoreserverapi/get-refund-history-v1.md)
- [Send Consumption Information V1](appstoreserverapi/send-consumption-information-v1.md)
- [ConsumptionRequestV1](appstoreserverapi/consumptionrequestv1.md)
- [RefundLookupResponse](appstoreserverapi/refundlookupresponse.md)
