# asc: in-app purchases and subscriptions

> asc commands for in-app purchases, subscriptions and their prices, offers and review, in-app events, and the App Store Server API.

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

These [asc](https://air.build/docs/cli/asc/) families manage what an app sells. Picking an Apple team (`--auth`), output, pagination, `--confirm` and exit codes work as described on the [asc](https://air.build/docs/cli/asc/) page. App prices and availability are under `asc pricing` (see [asc pricing](https://air.build/docs/cli/asc-pricing/)).

In the tables below, **Main flags** leaves out the flags almost every command has: `--output` and `--pretty` (see [Output](https://air.build/docs/cli/asc/#output)), `--limit`, `--next` and `--paginate` on list commands (see [Pagination](https://air.build/docs/cli/asc/#pagination)), and the `--…-fields` flags that pick which attributes Apple returns. Run `asc <family> <subcommand> --help` for every flag, its values and examples. Where a subcommand has subcommands of its own, they are listed instead.

## One-step setup

`iap setup` and `subscriptions setup` create a product with what App Store Connect needs, in one command. Every flag and rule: [iap setup](https://air.build/docs/cli/asc-iap/#setup) and [subscriptions setup](https://air.build/docs/cli/asc-subscriptions/#setup).

```bash
asc iap setup --app "1234567890" --type NON_CONSUMABLE --reference-name "Pro Lifetime" \
  --product-id com.example.lifetime --price 3.99 --base-territory "United States"

asc subscriptions setup --app "1234567890" --group-reference-name "Pro" --reference-name "Pro Monthly" \
  --product-id com.example.pro.monthly --subscription-period ONE_MONTH \
  --price 3.99 --price-territory "United States" --territories "US,Canada"
```

| Flag | Command | What it does |
| --- | --- | --- |
| `--type` | `iap` | `CONSUMABLE`, `NON_CONSUMABLE` or `NON_RENEWING_SUBSCRIPTION`. |
| `--reference-name`, `--product-id` | both | The internal name and the product ID. |
| `--locale`, `--display-name`, `--description` | both | The first localization. |
| `--price`, `--tier` or `--price-point-id` | both | The first price: a customer price, a tier number, or an exact price point. |
| `--base-territory` / `--price-territory` | `iap` / `subscriptions` | The territory the price is set in. Two- or three-letter code or English name. |
| `--start-date` | both | When the price starts (`YYYY-MM-DD`). |
| `--review-note` | both | A note for App Review. |
| `--family-sharable` | both | Turns on Family Sharing. It cannot be undone. |
| `--group-id` or `--group-reference-name` | `subscriptions` | An existing subscription group, or the name of a new one. `--group-display-name`, `--group-locale`, `--group-custom-app-name` localize it; `--group-level` sets the order. |
| `--subscription-period` | `subscriptions` | `ONE_WEEK`, `ONE_MONTH`, `TWO_MONTHS`, `THREE_MONTHS`, `SIX_MONTHS`, `ONE_YEAR`. |
| `--territories`, `--available-in-new-territories` | `subscriptions` | Where it is on sale. |
| `--review-screenshot` | `subscriptions` | The App Review screenshot. |
| `--enable-monthly-commitment` | `subscriptions` | For `ONE_YEAR`: also offer Monthly with 12-Month Commitment. |
| `--refresh` | both | Refreshes the cached price-point tiers used to resolve `--tier` or `--price`. |
| `--no-verify` | both | Skips reading the result back from Apple. |

`subscriptions setup` sets the price in every territory from Apple's equalized prices, and by default reads the subscription back and fails if Apple still reports missing metadata (`MISSING_METADATA`). `--repair` rebuilds and saves the whole price matrix again.

To submit a subscription version for review, add it to a review submission: `asc review items add --submission SUBMISSION_ID --item-type subscriptionVersions --item-id SUBSCRIPTION_VERSION_ID` (see [asc: review and release](https://air.build/docs/cli/asc-release/)). `asc validate iap` and `asc validate subscriptions` check readiness first.

## iap

Every subcommand and flag: [asc iap](https://air.build/docs/cli/asc-iap/).

Manage in-app purchases in App Store Connect.

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| `list` | List in-app purchases for an app. | `--app`, `--include`, `--include-versions`, `--legacy`, `--name`, `--product-id`, `--sort`, `--state`, `--type`, `--versions-limit` |
| `versions` | Manage versioned in-app purchase review content. | subcommands: `create`, `list`, `view`, `image`, `images`, `localizations`, `links`, `submit` |
| `pricing` | Manage in-app purchase pricing workflows. | subcommands: `summary`, `price-points`, `schedules`, `ppp`, `availability`, `availabilities` |
| `view` | View an in-app purchase by ID. | `--id`, `--include`, `--include-versions`, `--legacy`, `--versions-limit` |
| `create` | Create a new in-app purchase. | `--app`, `--family-sharable`, `--product-id`, `--ref-name`, `--review-note`, `--type` |
| `import` | Create in-app purchases in bulk from a JSON file. | `--app`, `--confirm`, `--dry-run`, `--file`, `--skip-existing` |
| `setup` | Create an in-app purchase with optional pricing. | `--app`, `--base-territory`, `--description`, `--display-name`, `--family-sharable`, `--locale`, `--no-verify`, `--price`, `--price-point-id`, `--product-id`, `--reference-name`, `--refresh`, `--review-note`, `--start-date`, `--tier`, `--type` |
| `update` | Update an in-app purchase. | `--family-sharable`, `--id`, `--ref-name`, `--review-note` |
| `delete` | Delete an in-app purchase. | `--confirm`, `--id` |
| `review-screenshots` | Manage in-app purchase review screenshots. | subcommands: `view`, `create`, `update`, `delete` |
| `promoted-purchases` | Manage promoted purchases for in-app purchases. | subcommands: `list`, `view`, `create`, `update`, `delete`, `link` |
| `content` | Fetch in-app purchase content metadata. | subcommands: `view` |
| `offer-codes` | Manage in-app purchase offer codes. | subcommands: `list`, `view`, `create`, `update`, `custom-codes`, `one-time-codes`, `prices` |

## subscriptions

Every subcommand and flag: [asc subscriptions](https://air.build/docs/cli/asc-subscriptions/).

Manage subscription groups and subscriptions.

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| `groups` | Manage subscription groups. | subcommands: `list`, `create`, `view`, `update`, `delete`, `versions` |
| `list` | List subscriptions in a group or app. | `--app`, `--group-id`, `--include`, `--versions-limit` |
| `create` | Create a subscription. | `--family-sharable`, `--group-id`, `--group-level`, `--product-id`, `--reference-name`, `--review-note`, `--subscription-period` |
| `setup` | Create or reconcile a subscription with complete App Store metadata. | `--app`, `--available-in-new-territories`, `--description`, `--display-name`, `--enable-monthly-commitment`, `--family-sharable`, `--group-custom-app-name`, `--group-display-name`, `--group-id`, `--group-level`, `--group-locale`, `--group-reference-name`, `--locale`, `--no-verify`, `--price`, `--price-point-id`, `--price-territory`, `--product-id`, `--reference-name`, `--refresh`, `--repair`, `--review-note`, `--review-screenshot`, `--start-date`, `--subscription-period`, `--territories`, `--tier` |
| `view` | View a subscription by ID. | `--id`, `--include`, `--versions-limit` |
| `update` | Update a subscription. | `--family-sharable`, `--group-level`, `--id`, `--market-settings`, `--multi-seat-status`, `--reference-name`, `--review-note`, `--subscription-period` |
| `delete` | Delete a subscription. | `--confirm`, `--id` |
| `pricing` | Manage subscription pricing. | subcommands: `summary`, `prices`, `price-points`, `availability`, `plan-availability`, `monthly-commitment`, `equalize`, `derive`, `ppp` |
| `offers` | Manage subscription offers. | subcommands: `introductory`, `promotional`, `offer-codes`, `win-back`, `retention` |
| `review` | Manage subscription review workflows. | subcommands: `screenshots`, `app-store-screenshot` |
| `promoted-purchases` | Manage promoted purchases for subscriptions. | subcommands: `list`, `view`, `create`, `update`, `delete`, `link` |
| `versions` | Manage version-scoped subscription metadata. | subcommands: `create`, `list`, `view`, `links`, `localizations`, `images` |
| `grace-periods` | Inspect subscription grace periods. | subcommands: `view`, `update` |
| `retention-messages` | Manage retention messages shown when people cancel a subscription. | subcommands: `list`, `view`, `create`, `delete`, `assigned`, `assign`, `subscriptions`, `versions`, `localizations`, `links` |

## app-events

Every subcommand and flag: [asc app-events](https://air.build/docs/cli/asc-app-events/).

Manage App Store in-app events.

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| `list` | List in-app events for an app. | `--app`, `--event-state`, `--id`, `--include`, `--localizations-limit` |
| `view` | View an in-app event by ID. | `--event-id` |
| `create` | Create a new in-app event. | `--app`, `--deep-link`, `--end`, `--event-type`, `--name`, `--primary-locale`, `--priority`, `--publish-start`, `--purchase-requirement`, `--purpose`, `--start`, `--territories` |
| `update` | Update an in-app event. | `--deep-link`, `--end`, `--event-id`, `--event-type`, `--name`, `--primary-locale`, `--priority`, `--publish-start`, `--purchase-requirement`, `--purpose`, `--start`, `--territories` |
| `delete` | Delete an in-app event. | `--confirm`, `--event-id` |
| `localizations` | Manage in-app event localizations. | subcommands: `list`, `view`, `screenshots`, `video-clips`, `screenshots-links`, `video-clips-links`, `create`, `update`, `delete`, `placements` |
| `links` | List localization relationships for an in-app event. | `--event-id` |
| `screenshots` | Manage in-app event screenshots. | subcommands: `list`, `links`, `view`, `create`, `delete` |
| `video-clips` | Manage in-app event video clips. | subcommands: `list`, `links`, `view`, `create`, `set-poster-frame`, `delete` |
| `submit` | Submit an in-app event for review. | `--app`, `--confirm`, `--event-id`, `--platform` |

## storekit

Every subcommand and flag: [asc storekit](https://air.build/docs/cli/asc-storekit/).

Manage StoreKit server APIs with In-App Purchase API keys.

| Subcommand | What it does | Main flags |
| --- | --- | --- |
| `auth` | Manage In-App Purchase API credentials for StoreKit. | subcommands: `login`, `status`, `switch`, `doctor`, `logout` |
| `transactions` | Read and manage In-App Purchase transactions with the App Store Server API. | subcommands: `view`, `history`, `set-account-token`, `send-consumption`, `finish` |
| `app-transactions` | Read signed app-purchase information. | subcommands: `view` |
| `subscriptions` | Read subscription status and extend renewal dates with the App Store Server API. | subcommands: `status`, `extend`, `extend-all`, `extension-status` |
| `refunds` | Read a customer's refunded In-App Purchases with the App Store Server API. | subcommands: `history` |
| `orders` | Look up a customer's In-App Purchases by order ID. | subcommands: `lookup` |
| `notifications` | Read App Store Server Notifications history and send test notifications. | subcommands: `history`, `test`, `test-status` |
| `groups` | Read multiseat customer groups and their members. | subcommands: `list`, `members` |
| `retention-messaging` | Manage subscription Retention Messaging resources. | subcommands: `images`, `messages`, `defaults`, `endpoint`, `performance` |

`storekit` calls the App Store Server API (transactions, subscription status, refunds, order lookup, server notifications, retention messaging). It needs an In-App Purchase API key of its own, separate from the Apple team connected in AirBuild: register it with `asc storekit auth login --name NAME --key-id KEY_ID --issuer-id ISSUER_ID --private-key ./SubscriptionKey.p8 --bundle-id com.example.app`, and check it with `asc storekit auth status`. Most `storekit` commands take `--environment production` or `sandbox`.

## Examples

List an app's in-app purchases and their prices:

```bash
asc iap list --app "1234567890" --paginate --output table
asc iap pricing summary --app "1234567890"
```

Create offer codes for a subscription:

```bash
asc subscriptions offers offer-codes generate --offer-code-id "OFFER_CODE_ID" --quantity 10 --expiration-date "2027-02-01"
```

Create an in-app event and submit it:

```bash
asc app-events create --app "1234567890" --name "Summer Challenge" --event-type CHALLENGE \
  --start "2027-06-01T00:00:00Z" --end "2027-06-30T23:59:59Z"
asc app-events submit --app "1234567890" --event-id "EVENT_ID" --confirm
```
