asc-subscriptions について
`asc` CLIでApp Store Connectの自動更新サブスクリプションを管理するスキルです。グループ、価格、ローカライズ、各種オファー、コード、審査用スクリーンショットを扱います。
主な機能
- 01サブスクリプショングループと階層の作成・管理
- 02地域別サブスクリプション価格の設定
- 03ローカライズと各種オファーの管理
- 04オファーコードの作成と無効化
- 05審査用スクリーンショットのアップロードと管理
活用シーン
- 01App Store Connectでサブスクリプションを設定
- 02地域ごとの価格を変更
- 03導入オファーや復帰オファーを作成
- 04オファーコードのバッチを生成・取得
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ tddworks/ asc-cli-skills --skill asc-subscriptionsインストール後、Claude Code で/asc-subscriptionsを入力して読み込まれたか確認します。
詳細
asc サブスクリプション
asc CLI を使用して、自動更新サブスクリプショングループ、ティア、ローカライズ、価格、オファー、レビュー用アセットを管理します。
サブスクリプショングループ
asc subscription-groups list --app-id <APP_ID>
asc subscription-groups create --app-id <APP_ID> --reference-name "Premium Plans"
asc subscription-groups update --group-id <GROUP_ID> --reference-name "Premium"
asc subscription-groups delete --group-id <GROUP_ID>
グループのローカライズ(ロケールごとの表示名+カスタム App 名)
asc subscription-group-localizations list --group-id <GROUP_ID>
asc subscription-group-localizations create --group-id <GROUP_ID> --locale en-US --name "Premium Plans" [--custom-app-name "Premium App"]
asc subscription-group-localizations update --localization-id <LOC> [--name "..."] [--custom-app-name "..."]
asc subscription-group-localizations delete --localization-id <LOC>
サブスクリプション(ライフサイクル)
asc subscriptions list --group-id <GROUP_ID>
asc subscriptions create --group-id <GROUP_ID> --name "Monthly Premium" \
--product-id "com.app.monthly" --period ONE_MONTH \
[--family-sharable] [--group-level 1]
asc subscriptions update --subscription-id <SUB_ID> \
[--name "..."] [--family-sharable | --not-family-sharable] [--group-level <n>] [--review-note "..."]
asc subscriptions delete --subscription-id <SUB_ID>
asc subscriptions submit --subscription-id <SUB_ID> # state must be READY_TO_SUBMIT
asc subscriptions unsubmit --submission-id <SUBMISSION_ID> # withdraw from review (manual Request<Void>)
asc subscriptions versions list --subscription-id <SUB_ID> # review versions + state (addToSubmission when submittable)
asc subscription-groups versions list --group-id <GROUP_ID> # a group's first subscription needs the group version too
初回のサブスクリプションですか? Apple はアプリのバージョン(およびそのグループのバージョン)と一緒にしかレビューしないため、初回のサブスクリプションに対して asc subscriptions submit を実行すると失敗します。アプリと一緒に送信してください:asc versions submit --version-id <VERSION_ID> --with-products(最初に --dry-run を付けて実行してください)。詳しくは submit-with-products.md を参照してください。
--period ∈ ONE_WEEK、ONE_MONTH、TWO_MONTHS、THREE_MONTHS、SIX_MONTHS、ONE_YEAR。
サブスクリプションの価格(テリトリーごと、proceedsYear2 を含む)
asc subscriptions price-points list --subscription-id <SUB_ID> [--territory USA]
asc subscriptions prices set \
--subscription-id <SUB_ID> \
--territory USA \
--price-point-id <PP> \
[--start-date 2026-06-01] \
[--preserve-current-price]
サブスクリプションの価格はテリトリーごとに設定します(ベーステリトリーはありません)。各価格ポイントには customerPrice、proceeds、proceedsYear2 が含まれます。
サブスクリプションのローカライズ
asc subscription-localizations list --subscription-id <SUB_ID>
asc subscription-localizations create --subscription-id <SUB_ID> --locale en-US --name "Monthly Premium" [--description "..."]
asc subscription-localizations update --localization-id <LOC> [--name "..."] [--description "..."]
asc subscription-localizations delete --localization-id <LOC>
初回購入オファー
asc subscription-offers list --subscription-id <SUB_ID>
# Free trial
asc subscription-offers create --subscription-id <SUB_ID> \
--duration ONE_MONTH --mode FREE_TRIAL --periods 1
# Paid intro offer — price-point-id required for PAY_AS_YOU_GO / PAY_UP_FRONT
asc subscription-offers create --subscription-id <SUB_ID> \
--duration THREE_MONTHS --mode PAY_AS_YOU_GO --periods 3 \
--territory USA --price-point-id <PP>
asc subscription-offers delete --offer-id <OFFER_ID>
--duration ∈ THREE_DAYS、ONE_WEEK、TWO_WEEKS、ONE_MONTH、TWO_MONTHS、THREE_MONTHS、SIX_MONTHS、ONE_YEAR。--mode ∈ FREE_TRIAL、PAY_AS_YOU_GO、PAY_UP_FRONT。
プロモーションオファー(アプリ内、テリトリーごとの価格設定)
asc subscription-promotional-offers list --subscription-id <SUB_ID>
asc subscription-promotional-offers create --subscription-id <SUB_ID> \
--name "Loyalty25" --offer-code loyalty25 \
--duration THREE_MONTHS --mode PAY_AS_YOU_GO --periods 3 \
--price USA=spp-1 --price GBR=spp-2 # repeatable: TERRITORY=PRICE_POINT_ID
asc subscription-promotional-offers delete --offer-id <OFFER_ID>
asc subscription-promotional-offers prices list --offer-id <OFFER_ID>
--price は ${newPromoOfferPrice-N} の形式のインラインローカル ID(1 始まり)を使ってエンコードします(ASC の Web UI の形式に対応します)。
再獲得オファー(解約したサブスクライバー向け)
asc win-back-offers list --subscription-id <SUB_ID>
asc win-back-offers create --subscription-id <SUB_ID> \
--reference-name "Lapsed Q4" --offer-id lapsedQ4 \
--duration ONE_MONTH --mode FREE_TRIAL --periods 1 \
--paid-months 3 --since-min 1 --since-max 6 --wait-months 2 \
--start-date 2026-04-01 --end-date 2026-12-31 \
--priority HIGH --promotion-intent USE_AUTO_GENERATED_ASSETS \
[--price USA=spp-1 ...]
asc win-back-offers update --offer-id <OFFER_ID> \
[--start-date YYYY-MM-DD] [--end-date YYYY-MM-DD] \
[--priority HIGH|NORMAL] [--promotion-intent NOT_PROMOTED|USE_AUTO_GENERATED_ASSETS] \
[--paid-months <n>] [--since-min <n>] [--since-max <n>] [--wait-months <n>]
asc win-back-offers delete --offer-id <OFFER_ID>
asc win-back-offers prices list --offer-id <OFFER_ID>
適用条件モデル:--paid-months(有料サブスクライバーである必要のある月数)、--since-min..--since-max(最後にサブスクリプションに登録してからの月数の範囲)、--wait-months(同じ顧客にオファーを表示する間隔)。生成された SDK の WinBackOfferPriceInlineCreate に territory と subscriptionPricePoint のリレーションシップがないため、再獲得オファーの作成リクエスト本文は手動でエンコードします。
サブスクリプションオファーコード(3 階層構造)
レベル 1 — オファーコード
asc subscription-offer-codes list --subscription-id <SUB_ID>
asc subscription-offer-codes create --subscription-id <SUB_ID> \
--name "SUMMER2026" \
--duration ONE_MONTH --mode FREE_TRIAL --periods 1 \
--eligibility NEW --eligibility LAPSED \
--offer-eligibility STACKABLE \
--price USA=spp-usa --price JPN=spp-jpn \
--free-territory BRA \
[--auto-renew true|false]
asc subscription-offer-codes update --offer-code-id <OC> --active false
asc subscription-offer-codes prices list --offer-code-id <OC> # per-territory pricing (read-only)
価格は作成時に一度だけ設定します(作成後の prices は読み取り専用です。詳しくは IAP スキルの注記を参照してください)。更新されない一回限りのオファーを作成するには --auto-renew false を使用します。この場合、ASC が受け付けるのは --mode FREE_TRIAL のみです。
--eligibility(繰り返し指定可能)∈ NEW、LAPSED、WIN_BACK、PAID_SUBSCRIBER。--offer-eligibility ∈ STACKABLE、INTRODUCTORY、SUBSCRIPTION_OFFER。
レベル 2 — カスタムの引き換えコード
asc subscription-offer-code-custom-codes list --offer-code-id <OC>
asc subscription-offer-code-custom-codes create --offer-code-id <OC> \
--custom-code "SUMMER2026" --number-of-codes 1000 [--expiration-date 2026-12-31]
asc subscription-offer-code-custom-codes update --custom-code-id <CC> --active false
レベル 3 — 一回限り使用できるコードのバッチ
asc subscription-offer-code-one-time-codes list --offer-code-id <OC>
asc subscription-offer-code-one-time-codes create --offer-code-id <OC> \
--number-of-codes 5000 --expiration-date 2026-12-31 [--environment production|sandbox]
asc subscription-offer-code-one-time-codes update --one-time-code-id <OTC> --active false
# Download the CSV of redemption codes (raw String — not JSON):
asc subscription-offer-code-one-time-codes values --one-time-code-id <OTC>
--environment のデフォルトは production です。Sandbox バッチは Sandbox テスターアカウントで引き換えられます(四半期あたり約 10,000 件が上限)。Production バッチは実際のアカウントで引き換えられます(四半期あたり約 150,000 件が上限)。各 SubscriptionOfferCode は productionCodeCount/sandboxCodeCount を通じて両方の使用状況を報告し、一回限り使用できる各コードの行には、絞り込み用の environment が含まれます。
REST による同等の操作:
GET /api/v1/subscription-offer-codes/{offerCodeId}/one-time-codes
POST /api/v1/subscription-offer-codes/{offerCodeId}/one-time-codes # body: {numberOfCodes, expirationDate, environment?}
PATCH /api/v1/subscription-offer-code-one-time-codes/{oneTimeCodeId} # body: {isActive: false}
サブスクリプションのレビュー用スクリーンショット(単一インスタンス)
asc subscription-review-screenshot get --subscription-id <SUB_ID> # empty data:[] when none
asc subscription-review-screenshot upload --subscription-id <SUB_ID> --file ./review.png
asc subscription-review-screenshot delete --screenshot-id <RS> # suppressed while AWAITING_UPLOAD
アップロードでは、ASC の予約 → チャンクのアップロード → MD5 付きコミットのプロトコルを使用します。
CAEOAS の機能
SubscriptionGroup が提供する機能:
{
"affordances": {
"createLocalization": "asc subscription-group-localizations create --group-id <ID> --locale en-US --name <name>",
"createSubscription": "asc subscriptions create --group-id <ID> --name <name> --product-id <id> --period ONE_MONTH",
"delete": "asc subscription-groups delete --group-id <ID>",
"listLocalizations": "asc subscription-group-localizations list --group-id <ID>",
"listSubscriptions": "asc subscriptions list --group-id <ID>",
"update": "asc subscription-groups update --group-id <ID> --reference-name <name>"
}
}
Subscription が提供する機能(既存のキーに加えて):
{
"createPromotionalOffer": "asc subscription-promotional-offers create --subscription-id <ID> ...",
"delete": "asc subscriptions delete --subscription-id <ID>",
"getReviewScreenshot": "asc subscription-review-screenshot get --subscription-id <ID>",
"listPromotionalOffers": "asc subscription-promotional-offers list --subscription-id <ID>",
"listVersions": "asc subscriptions versions list --subscription-id <ID>",
"listWinBackOffers": "asc win-back-offers list --subscription-id <ID>",
"update": "asc subscriptions update --subscription-id <ID> --name <name>"
}
state == READY_TO_SUBMIT の場合のみ submit が可能です。SubscriptionSubmission は unsubmit を提供します。SubscriptionLocalization は update と delete を提供します。SubscriptionGroupLocalization は update と delete を提供します。SubscriptionPricePoint は territory != nil の場合のみ setPrice を提供します。SubscriptionPromotionalOffer は delete と listPrices を提供します。WinBackOffer は update、delete、listPrices を提供します。SubscriptionReviewScreenshot は assetState.isComplete || hasFailed になった場合のみ delete を提供します。カスタムコードと一回限り使用できるコードの *OfferCode* は、isActive == true の場合のみ deactivate を提供します。
App ID の解決
project-context.md を参照してください。ユーザーに尋ねたり asc apps list を実行したりする前に .asc/project.json を確認してください。
一般的なワークフロー
APP_ID=$(cat .asc/project.json 2>/dev/null | jq -r '.appId // empty')
# 1. Group + tier + group-localization
GROUP_ID=$(asc subscription-groups create --app-id "$APP_ID" --reference-name "Premium" \
| jq -r '.data[0].id')
asc subscription-group-localizations create --group-id "$GROUP_ID" --locale en-US \
--name "Premium Plans" --custom-app-name "Premium App"
SUB_ID=$(asc subscriptions create --group-id "$GROUP_ID" --name "Monthly Premium" \
--product-id "com.app.monthly" --period ONE_MONTH | jq -r '.data[0].id')
asc subscription-localizations create --subscription-id "$SUB_ID" --locale en-US \
--name "Monthly Premium" --description "Unlock everything"
# 2. Per-territory pricing
USA_PP=$(asc subscriptions price-points list --subscription-id "$SUB_ID" --territory USA \
| jq -r '.data[] | select(.customerPrice == "9.99") | .id')
asc subscriptions prices set --subscription-id "$SUB_ID" --territory USA --price-point-id "$USA_PP"
# 3. Review screenshot + submit (first-time subscription: with the app version instead,
# `asc versions submit --version-id "$VERSION_ID" --with-products`)
asc subscription-review-screenshot upload --subscription-id "$SUB_ID" --file ./review.png
asc subscriptions submit --subscription-id "$SUB_ID"
# 4. Promotional offer with per-territory pricing
asc subscription-promotional-offers create --subscription-id "$SUB_ID" \
--name "Loyalty25" --offer-code loyalty25 \
--duration THREE_MONTHS --mode PAY_AS_YOU_GO --periods 3 \
--price USA=$USA_PP
# 5. Win-back campaign
asc win-back-offers create --subscription-id "$SUB_ID" \
--reference-name "Lapsed Q4" --offer-id lapsedQ4 \
--duration ONE_MONTH --mode FREE_TRIAL --periods 1 \
--paid-months 3 --since-min 1 --since-max 6 --wait-months 2 \
--start-date 2026-04-01 --end-date 2026-12-31 \
--priority HIGH --promotion-intent USE_AUTO_GENERATED_ASSETS
# 6. Offer code + one-time redemption batch
OC_ID=$(asc subscription-offer-codes create --subscription-id "$SUB_ID" \
--name "SUMMER2026" --duration ONE_MONTH --mode FREE_TRIAL --periods 1 \
--eligibility NEW --eligibility LAPSED --offer-eligibility STACKABLE \
| jq -r '.data[0].id')
asc subscription-offer-code-one-time-codes create --offer-code-id "$OC_ID" \
--number-of-codes 5000 --expiration-date 2026-12-31
# Distribute the codes:
asc subscription-offer-code-one-time-codes values --one-time-code-id <OTC_ID> > codes.csv
状態のセマンティクス
SubscriptionState は、次のセマンティックな真偽値を公開します。
| 真偽値 | 状態が次の場合に true |
|---|---|
isEditable | MISSING_METADATA、REJECTED、DEVELOPER_ACTION_NEEDED |
isPendingReview | WAITING_FOR_REVIEW、IN_REVIEW |
isApproved / isLive | APPROVED |
SubscriptionCustomerEligibility ∈ NEW、LAPSED、WIN_BACK、PAID_SUBSCRIBER。
SubscriptionOfferEligibility ∈ STACKABLE、INTRODUCTORY、SUBSCRIPTION_OFFER。
WinBackOfferPriority ∈ HIGH、NORMAL。WinBackOfferPromotionIntent ∈ NOT_PROMOTED、USE_AUTO_GENERATED_ASSETS。
SubscriptionReviewScreenshot.AssetState は、isComplete と hasFailed を公開します。
nil のオプションフィールドは JSON 出力から省略されます。PATCH レスポンス(更新コマンド)では、ASC の PATCH レスポンスに親 ID が含まれないため、親 ID が "" のリソースが返されます。親 ID が必要な場合は、list で再取得してください。
リファレンス
ドメインモデルと REST の詳細については、docs/features/iap-subscriptions.md と iap-subscriptions/ のサブドキュメント(ライフサイクル、価格設定、オファーコード、グループのローカライゼーション、プロモーションオファー、ウィンバックオファー、審査用アセット)を参照してください。