Get All Subscription Statuses
Get the statuses for all of a customer’s auto-renewable subscriptions in your app.
URL
GET https://api.storekit.apple.com/inApps/v1/subscriptions/{anyTransactionId}Sandbox URL
GET https://api.storekit-sandbox.apple.com/inApps/v1/subscriptions/{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 |
|---|---|---|
status Optional | [status] | An optional filter that indicates the status of subscriptions to include in the response. Your query may specify more than one |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | StatusResponse | Request succeeded. |
| 400 | Bad Request Content-Type: application/json | (InvalidAppIdentifierError | InvalidTransactionIdError | InvalidStatusError) | |
| 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 | (AccountNotFoundError | AccountNotFoundRetryableError | AppNotFoundError | AppNotFoundRetryableError | TransactionIdNotFoundError) | |
| 429 | Content-Type: application/json | RateLimitExceededError | The request exceeded the rate limit. |
| 500 | Internal Server Error Content-Type: application/json | (GeneralInternalError | GeneralInternalRetryableError) |
Mentioned in
Discussion
This API returns the status for all of the customer’s subscriptions, organized by their subscription group identifier.
Specify multiple values for the status query parameter to get a response that contains subscriptions with statuses that match any of the values. For example, the following request returns subscriptions that are active (status value of 1) and subscriptions that are in the Billing Grace Period (status value of 4):
GET https://api.storekit.apple.com/inApps/v1/subscriptions/{anyTransactionId}?status=1&status=4