# asc storekit

> asc storekit commands: call the App Store Server API with an In-App Purchase API key to read transactions, subscription status, refunds, orders, notifications and multiseat groups, extend renewals and manage Retention Messaging.

Source: https://air.build/docs/cli/asc-storekit/

`asc storekit` calls Apple's App Store Server API: a customer's transactions, app transaction, subscription statuses, refunds and orders, App Store Server Notifications, multiseat groups, renewal-date extensions and Retention Messaging. It does not use the Apple team AirBuild connects for the rest of `asc`: it needs an In-App Purchase API key of its own, registered with [auth login](https://air.build/docs/cli/asc-storekit/#auth-login) and checked with [auth status](https://air.build/docs/cli/asc-storekit/#auth-status). Most commands need `--environment` (`production` or `sandbox`); `--bundle-id` falls back to `ASC_STOREKIT_BUNDLE_ID`, and `--storekit-profile` (a credential name from `auth login`) to `ASC_STOREKIT_PROFILE`, else the default credential. Output, `--paginate`, `--confirm` and exit codes work as described on the [asc](https://air.build/docs/cli/asc/) page; the flag tables below leave out `--output`, `--pretty`, `--limit` and `--paginate`. "Required." marks the flags the command's help lists as required.

## auth

Manage In-App Purchase API credentials for StoreKit.

These credentials are separate from the Apple team AirBuild connects for `asc`.

### auth login

Register an In-App Purchase API key.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier. | — |
| `--bypass-keychain` | Store the key path in config.json instead of keychain. | `false` |
| `--environment` | Network validation environment: `production` or `sandbox`. | — |
| `--issuer-id` | In-App Purchase API issuer ID. | — |
| `--key-id` | In-App Purchase API key ID. | — |
| `--local` | When bypassing keychain, write to ./.asc/config.json. | `false` |
| `--name` | Friendly name for this StoreKit key. | — |
| `--network` | Validate credentials with the Retention Messaging API. | `false` |
| `--private-key` | Path to the In-App Purchase EC private key. | — |
| `--skip-validation` | Skip private key and network validation. | `false` |

```sh
asc storekit auth login --name Production --key-id KEY_ID --issuer-id ISSUER_ID --private-key ./SubscriptionKey.p8 --bundle-id com.example.app
```

### auth status

Show StoreKit authentication status.

| Flag | What it does | Default |
| --- | --- | --- |
| `--environment` | Validation environment: `production` or `sandbox`. | — |
| `--validate` | Validate every stored credential via network. | `false` |

```sh
asc storekit auth status
```

### auth switch

Set the default StoreKit credential.

| Flag | What it does | Default |
| --- | --- | --- |
| `--name` | StoreKit credential name. Required. | — |

### auth doctor

Diagnose StoreKit credential resolution and request signing.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--network` | Validate credentials with the Retention Messaging API. | `false` |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit auth doctor --environment sandbox
```

### auth logout

Remove StoreKit credentials.

| Flag | What it does | Default |
| --- | --- | --- |
| `--all` | Remove all StoreKit credentials. | `false` |
| `--confirm` | Confirm credential removal. Required. | `false` |
| `--name` | StoreKit credential name. | — |

## transactions

Read and manage In-App Purchase transactions with the App Store Server API.

### transactions view

Get one transaction (Get Transaction Info).

Gets one transaction.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Transaction ID or original transaction ID. Required. | — |

```sh
asc storekit transactions view --transaction-id 2000000000000001 --environment sandbox
```

### transactions history

Get a customer's transaction history (Get Transaction History v2).

Gets a customer's In-App Purchase history. Apple returns up to 20 transactions per page; use `--paginate` for all pages or `--revision` to continue from a stored revision with the same filters.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--end` | Only purchases before this date (`YYYY-MM-DD` or RFC3339). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--ownership-type` | In-app ownership filter (one value): `FAMILY_SHARED`, `PURCHASED`, `ASSIGNED`. | — |
| `--product-id` | Product ID filter (comma-separated). | — |
| `--product-type` | Product type filter (comma-separated): `AUTO_RENEWABLE`, `NON_RENEWABLE`, `CONSUMABLE`, `NON_CONSUMABLE`. | — |
| `--revision` | Revision token from a previous response, to continue from that page. | — |
| `--revoked` | True for only revoked transactions, false for only non-revoked. | — |
| `--sort` | Sort by modified date: `ASCENDING` (Apple's default) or `DESCENDING`. | — |
| `--start` | Only purchases on or after this date (`YYYY-MM-DD` or RFC3339). | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Any transaction, original transaction, or app transaction ID for the customer. Required. | — |

```sh
asc storekit transactions history --transaction-id 2000000000000001 --environment production --paginate
```

### transactions set-account-token

Set or replace a purchase's app account token.

Works for any purchase type. For auto-renewable subscriptions, Apple updates the current and future renewals and leaves past transactions unchanged. Family Shared transactions are not supported.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app-account-token` | Customer account UUID to associate with the purchase. Required. | — |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm this mutation. Required. | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--original-transaction-id` | Original transaction ID whose account association is replaced. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit transactions set-account-token --original-transaction-id 2000000000000001 --app-account-token 11111111-2222-4333-8444-555555555555 --environment sandbox --confirm
```

### transactions send-consumption

Send v2 consumption information for a refund request.

Answers a `CONSUMPTION_REQUEST` notification, within 12 hours. Send data only with the customer's consent. Apple makes the refund decision.

Leave out `--consumption-percentage` for auto-renewable subscriptions; Apple calculates it. For other product types, `50000` means 50% consumed; `GRANT_PRORATED` needs a value strictly between 0 and 100000, and undelivered purchases need `0`.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm this mutation. Required. | `false` |
| `--consumption-percentage` | Consumed portion in integer milliunits (0-100000); omit for auto-renewable subscriptions. | — |
| `--customer-consented` | Explicitly true when the customer consented to share consumption data. Required. | — |
| `--delivery-status` | `DELIVERED`, `UNDELIVERED_QUALITY_ISSUE`, `UNDELIVERED_WRONG_ITEM`, `UNDELIVERED_SERVER_OUTAGE`, `UNDELIVERED_OTHER`. Required. | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--refund-preference` | Optional: `DECLINE`, `GRANT_FULL`, `GRANT_PRORATED`. | — |
| `--sample-content-provided` | True or false, whether a free sample, trial, or functionality information was provided. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Transaction ID from a `CONSUMPTION_REQUEST` notification. Required. | — |

```sh
asc storekit transactions send-consumption --transaction-id 2000000000000001 --customer-consented true --delivery-status DELIVERED --sample-content-provided false --consumption-percentage 50000 --environment production --confirm
```

### transactions finish

Mark a transaction as finished after content delivery.

Tell Apple only after your server has delivered the purchased content. If the app already calls StoreKit's `Transaction.finish()`, this call isn't needed. The command sends once, without retries.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm this mutation. Required. | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Transaction ID to mark as finished after delivering its content. Required. | — |

```sh
asc storekit transactions finish --transaction-id 2000000000000001 --environment production --confirm
```

## app-transactions

Read signed app-purchase information.

### app-transactions view

Get a customer's app transaction information.

Includes the original app version and purchase date.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Any transaction, original transaction, or app transaction ID for the customer. Required. | — |

```sh
asc storekit app-transactions view --transaction-id 2000000000000001 --environment sandbox
```

## subscriptions

Read subscription status and extend renewal dates with the App Store Server API.

### subscriptions status

Get all subscription statuses for a customer (Get All Subscription Statuses).

Gets the status of every auto-renewable subscription the customer has in your app.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--status` | Status filter (comma-separated): 1 active, 2 expired, 3 billing retry, 4 grace period, 5 revoked. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Any transaction, original transaction, or app transaction ID for the customer. Required. | — |

```sh
asc storekit subscriptions status --transaction-id 2000000000000001 --environment production
```

### subscriptions extend

Extend one eligible subscription's renewal date.

Compensates for a service interruption by extending an eligible paid, active subscription by up to 90 days. Extensions can't be reversed. Apple extends only active subscriptions with at least one paid period, at most twice per customer within 365 days; subscriptions in a free offer period, in billing retry, in a billing grace period with a past expiration date, or expired are not eligible. Apple emails each customer whose renewal date moves.

When Apple answers `success:false`, the command prints the response and exits `1`. Reuse the same `--request-id` to retry an uncertain request.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm this mutation. Required. | `false` |
| `--days` | Number of days to extend (1-90). Required. | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--original-transaction-id` | Original transaction ID of the paid, active subscription. Required. | — |
| `--reason` | 0 undeclared, 1 customer satisfaction, 2 other, 3 service issue/outage. Required. | — |
| `--request-id` | Unique request identifier (max 128 characters; bulk requires UUID); reuse when retrying. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit subscriptions extend --original-transaction-id 2000000000000001 --days 7 --reason 3 --request-id outage-2026-10-01 --environment production --confirm
```

### subscriptions extend-all

Request renewal extensions for all eligible subscribers of a product.

Submits an asynchronous extension for all eligible subscribers of a product. Leaving out `--storefront-country-codes` targets all eligible storefronts. Extensions can't be reversed, and the same eligibility rules apply as for [subscriptions extend](https://air.build/docs/cli/asc-storekit/#subscriptions-extend). A successful submission only means Apple accepted it for processing: check [subscriptions extension-status](https://air.build/docs/cli/asc-storekit/#subscriptions-extension-status), or watch for `RENEWAL_EXTENDED` notifications (each success) and `RENEWAL_EXTENSION` notifications (`FAILURE` and `SUMMARY`). Reuse the same `--request-id` UUID when retrying an uncertain request.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm this mutation. Required. | `false` |
| `--days` | Number of days to extend (1-90). Required. | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--product-id` | Auto-renewable subscription product ID (not its App Store Connect resource ID). Required. | — |
| `--reason` | 0 undeclared, 1 customer satisfaction, 2 other, 3 service issue/outage. Required. | — |
| `--request-id` | Unique request identifier (max 128 characters; bulk requires UUID); reuse when retrying. Required. | — |
| `--storefront-country-codes` | Optional comma-separated three-letter storefront codes; omit for all eligible storefronts. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit subscriptions extend-all --product-id com.example.monthly --days 7 --reason 3 --request-id 11111111-2222-4333-8444-555555555555 --environment production --confirm
```

### subscriptions extension-status

Check bulk renewal-extension completion and final counts.

Checks once, without waiting. Processing can take hours or days; final counts appear when `complete` is true.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--product-id` | Subscription product ID used in the bulk extension request. Required. | — |
| `--request-id` | Request UUID used in the bulk extension request. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit subscriptions extension-status --product-id com.example.monthly --request-id 11111111-2222-4333-8444-555555555555 --environment production
```

## refunds

Read a customer's refunded In-App Purchases with the App Store Server API.

### refunds history

Get a customer's refunded purchases (Get Refund History v2).

Gets a customer's App Store-approved refunds. Apple returns up to 20 transactions per page; use `--paginate` for all pages or `--revision` to continue from a stored revision.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--revision` | Revision token from a previous response, to continue from that page. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Any transaction, original transaction, or app transaction ID for the customer. Required. | — |

```sh
asc storekit refunds history --transaction-id 2000000000000001 --environment production --paginate
```

## orders

Look up a customer's In-App Purchases by order ID.

Uses the order ID from the customer's App Store receipt. Apple doesn't offer order lookup in sandbox.

### orders lookup

Look up In-App Purchases by order ID (Look Up Order ID).

A status of `0` means the order ID is valid; `1` means it's invalid or has no In-App Purchases for your app. `--environment` must be `production`.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--order-id` | Order ID from the customer's App Store receipt. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit orders lookup --order-id MQXYZ12345 --environment production
```

## notifications

Read App Store Server Notifications history and send test notifications.

### notifications history

Get App Store Server Notifications history (Get Notification History).

Gets the version 2 notifications the App Store tried to send to your server. Apple sends this read as a POST; it changes nothing and works in read-only mode. Apple returns up to 20 records per page; use `--paginate` for all pages.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--end` | End of the timespan (`YYYY-MM-DD` or RFC3339). Required. | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--only-failures` | Only notifications that haven't reached your server. | `false` |
| `--pagination-token` | Pagination token from a previous response, to continue from that page. | — |
| `--start` | Start of the timespan (`YYYY-MM-DD` or RFC3339); Apple keeps 180 days in production, 30 in sandbox. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--subtype` | Only this notification subtype (requires `--type`). | — |
| `--transaction-id` | Only notifications for this customer's transaction (cannot combine with `--type`). | — |
| `--type` | Only this `notificationType`, such as `SUBSCRIBED` or `REFUND`. | — |

```sh
asc storekit notifications history --start 2026-09-01 --end 2026-09-08 --environment production
```

### notifications test

Ask the App Store to send a `TEST` notification (Request a Test Notification).

The App Store sends one `TEST` notification to the App Store Server Notifications URL set for the chosen environment. Pass the returned `testNotificationToken` to [notifications test-status](https://air.build/docs/cli/asc-storekit/#notifications-test-status) to see whether your server received it.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm sending a `TEST` notification to your configured server URL. Required. | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit notifications test --environment sandbox --confirm
```

### notifications test-status

Check a `TEST` notification's delivery (Get Test Notification Status).

Apple returns not found (exit `4`) until the status is available.

`--decode` adds a decoded `<field>Decoded` copy of each signed (JWS) field to JSON output; table and markdown output show decoded fields. Decoding does not verify Apple's signature, so don't grant entitlements from decoded output alone.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--decode` | Add `<field>Decoded` siblings with signed JWS payloads decoded WITHOUT signature verification (JSON only). | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--token` | `testNotificationToken` from `asc storekit notifications test`. Required. | — |

```sh
asc storekit notifications test-status --token TOKEN --environment sandbox
```

## groups

Read multiseat customer groups and their members.

Production returns groups with a `groupType` of `ORGANIZATION`; sandbox also returns Apple's placeholder groups. Group membership is separate from entitlement: read transactions to decide what a customer can access.

### groups list

List the groups a customer belongs to (Get Customer Groups).

Lists the groups and the customer's role for each product. In sandbox, a customer without a `CONSUMER` group gets Apple's placeholder `ORGANIZATION` group `900000000000000000`.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--transaction-id` | Any transaction, original transaction, or app transaction ID for the customer. Required. | — |

```sh
asc storekit groups list --transaction-id 2000000000000001 --environment production
```

### groups members

List the members of a group (Get Group Members).

Lists the customers in a multiseat group, by app transaction ID.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--group-id` | Group ID from `asc storekit groups list`. Required. | — |
| `--pagination-token` | Pagination token from a previous response, to continue from that page. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit groups members --group-id 900000000000000000 --environment sandbox --paginate
```

## retention-messaging

Manage subscription Retention Messaging resources.

Access needs Apple's approval and an In-App Purchase API key of its own.

### retention-messaging images

Upload, list, and delete retention images.

#### retention-messaging images list

List retention images.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit retention-messaging images list --environment sandbox
```

#### retention-messaging images upload

Upload a PNG retention image.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--file` | Path to a PNG image. Required. | — |
| `--image-id` | Client-generated image UUID. Required. | — |
| `--image-size` | Image size: `FULL_SIZE` or `BULLET_POINT`. | `FULL_SIZE` |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

#### retention-messaging images delete

Delete a retention image.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm image deletion. Required. | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--image-id` | Image UUID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

### retention-messaging messages

Upload, list, and delete retention messages.

#### retention-messaging messages list

List retention messages.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit retention-messaging messages list --environment sandbox
```

#### retention-messaging messages upload

Upload a retention message.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--file` | Path to a retention message JSON file. Required. | — |
| `--message-id` | Client-generated message UUID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit retention-messaging messages upload --message-id UUID --file message.json --environment sandbox
```

#### retention-messaging messages delete

Delete a retention message.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm message deletion. Required. | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--message-id` | Message UUID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

### retention-messaging defaults

View, set, and delete product-locale default messages.

#### retention-messaging defaults view

View the default retention message.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--locale` | App Store locale, for example `en-US`. Required. | — |
| `--product-id` | Subscription product ID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

#### retention-messaging defaults set

Set the default retention message.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--locale` | App Store locale, for example `en-US`. Required. | — |
| `--message-id` | Approved retention message UUID. Required. | — |
| `--product-id` | Subscription product ID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

```sh
asc storekit retention-messaging defaults set --product-id com.example.monthly --locale en-US --message-id UUID --environment production
```

#### retention-messaging defaults delete

Delete the default retention message.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm default deletion. Required. | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--locale` | App Store locale, for example `en-US`. Required. | — |
| `--product-id` | Subscription product ID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

### retention-messaging endpoint

View, set, and delete the realtime endpoint URL.

#### retention-messaging endpoint view

View the realtime retention endpoint URL.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

#### retention-messaging endpoint set

Set the realtime retention endpoint URL.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--url` | Complete HTTPS Get Retention Message endpoint URL. Required. | — |

```sh
asc storekit retention-messaging endpoint set --url https://example.com/retention --environment production
```

#### retention-messaging endpoint delete

Delete the realtime retention endpoint URL.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--confirm` | Confirm endpoint URL deletion. Required. | `false` |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

### retention-messaging performance

Start and inspect sandbox endpoint performance tests.

Apple offers these only in the sandbox environment.

#### retention-messaging performance start

Start a sandbox endpoint performance test.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--interval` | Polling interval when `--wait` is set (minimum 10s). | `10s` |
| `--original-transaction-id` | Sandbox subscription original transaction ID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--timeout` | Maximum wait time. | `10m0s` |
| `--wait` | Wait until the performance test finishes. | `false` |

#### retention-messaging performance view

View a sandbox performance test result.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--request-id` | Performance test request ID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |

#### retention-messaging performance wait

Wait for a sandbox performance test to finish.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle-id` | App bundle identifier (or `ASC_STOREKIT_BUNDLE_ID`). | — |
| `--environment` | StoreKit environment: `production` or `sandbox`. Required. | — |
| `--interval` | Polling interval (minimum 10s). | `10s` |
| `--request-id` | Performance test request ID. Required. | — |
| `--storekit-profile` | StoreKit credential profile (or `ASC_STOREKIT_PROFILE`). | — |
| `--timeout` | Maximum wait time. | `10m0s` |
