[GH-ISSUE #357] Feature: Per-Territory Pricing for Subscriptions and IAPs #104

Closed
opened 2026-02-26 21:33:25 +03:00 by kerem · 5 comments
Owner

Originally created by @rudrankriyam on GitHub (Jan 31, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/357

Overview

Add support for setting different prices for subscriptions and in-app purchases across different territories (countries/regions). This enables developers to implement purchasing power parity (PPP) pricing strategies, where prices are adjusted based on local economic conditions.

Currently, the CLI supports adding subscription prices with a price point, but doesn't expose the territory relationship that the API supports. This means developers cannot set different prices for different countries programmatically.

Use Case

A developer wants to price their subscription at:

  • $9.99 in USA
  • ₹299 in India (PPP-adjusted)
  • €8.99 in Germany
  • ¥980 in Japan

This requires calling POST /v1/subscriptionPrices for each territory with the appropriate territory-specific price point.

API Documentation

Key quote from Apple docs:

"To set a price point for another territory, use POST /v1/subscriptionPrices, replacing the subscriptionPricePoint ID with values obtained from GET /v1/subscriptionPricePoints/{id}/equalizations"

Scope (OpenAPI resources)

Subscriptions

  • POST /v1/subscriptionPrices - Create with optional territory relationship (needs --territory flag)
  • DELETE /v1/subscriptionPrices/{id} - Delete a subscription price (not implemented)
  • GET /v1/subscriptions/{id}/prices - List current prices (not implemented)
  • GET /v1/subscriptionPricePoints/{id}/equalizations - Get territory-specific price points ( exists)

In-App Purchases

  • POST /v1/inAppPurchasePriceSchedules - Create with manual prices per territory (not implemented)
  • GET /v1/inAppPurchasePriceSchedules/{id}/manualPrices - List manual prices (not implemented)
  • GET /v1/inAppPurchasePricePoints/{id}/equalizations - Get territory-specific price points (not implemented)

Proposed CLI

Subscriptions - New/Modified Commands

# List current prices for a subscription
asc subscriptions prices list --id "SUB_ID"

# Add a price for a specific territory
asc subscriptions prices add --id "SUB_ID" --price-point "PRICE_POINT_ID" --territory "USA"
asc subscriptions prices add --id "SUB_ID" --price-point "PRICE_POINT_ID" --territory "IND"

# Delete a subscription price
asc subscriptions prices delete --price-id "PRICE_ID" --confirm

# Get equalizations (territory-specific price points) - already exists but verify working
asc subscriptions price-points equalizations --id "PRICE_POINT_ID"

In-App Purchases - New Commands

# List price points for an IAP
asc iap price-points list --id "IAP_ID"
asc iap price-points list --id "IAP_ID" --territory "USA"

# Get equalizations for IAP price points
asc iap price-points equalizations --id "PRICE_POINT_ID"

# Get current price schedule
asc iap price-schedule get --id "IAP_ID"

# Create price schedule with manual prices
asc iap price-schedule create --id "IAP_ID" --base-territory "USA" --price-point "PRICE_POINT_ID"

# List manual/automatic prices
asc iap price-schedule manual-prices --schedule-id "SCHEDULE_ID"
asc iap price-schedule automatic-prices --schedule-id "SCHEDULE_ID"

Workflow Example

Setting PPP-based pricing for a subscription:

# 1. List price points for base territory (USA)
asc subscriptions price-points list --id "SUB_ID" --territory "USA"
# Returns price point ID for $9.99 tier

# 2. Get equalizations to find equivalent price points in other territories
asc subscriptions price-points equalizations --id "eyJzIjoiNjY..."
# Returns price points for all territories with their local prices

# 3. Find the India price point that matches your PPP target (e.g., ₹299)
# Use the price point ID from equalizations

# 4. Set the price for India
asc subscriptions prices add --id "SUB_ID" --price-point "IND_PRICE_POINT_ID" --territory "IND"

# 5. Repeat for other territories
asc subscriptions prices add --id "SUB_ID" --price-point "DEU_PRICE_POINT_ID" --territory "DEU"

Flag Patterns

Common:

  • --id, --price-id, --schedule-id, --output, --pretty, --limit, --next, --paginate, --confirm

New flags:

  • --territory - Territory ID (e.g., USA, IND, DEU, JPN)
  • --price-point - Price point ID
  • --base-territory - Base territory for price schedules

Output

  • JSON minified by default
  • --pretty for JSON
  • --output table/markdown for list commands

Detailed TODO

Subscriptions

  • Add --territory flag to subscriptions prices add command
  • Update client method CreateSubscriptionPrice to accept territory relationship
  • Add subscriptions prices list command + client method
  • Add subscriptions prices delete command + client method
  • Verify subscriptions price-points equalizations works correctly

In-App Purchases

  • Add iap price-points list command + client method
  • Add iap price-points equalizations command + client method
  • Add iap price-schedule get command + client method
  • Add iap price-schedule create command + client method (with manual prices support)
  • Add iap price-schedule manual-prices command + client method
  • Add iap price-schedule automatic-prices command + client method

General

  • Add cmdtests for all new commands
  • Add HTTP client tests (mocked)
  • Update documentation

Acceptance Criteria

  • Can list current subscription prices per territory
  • Can add subscription price for a specific territory
  • Can delete a subscription price
  • Can list IAP price points with territory filter
  • Can get IAP price point equalizations
  • Can create/manage IAP price schedules
  • Pagination works for all list commands
  • All commands have proper error handling and validation

Tests

  • Flag validation tests (missing required flags, invalid territory codes)
  • HTTP client tests for all new endpoints
  • Integration tests showing full PPP pricing workflow
  • Output format tests (json, table, markdown)

Implementation Notes

  • Add/modify client methods in internal/asc/client_subscriptions.go and internal/asc/client_iap.go
  • Add CLI commands in internal/cli/subscriptions/ and internal/cli/iap/
  • Follow patterns from existing subscriptions prices add command
  • The territory relationship in SubscriptionPriceCreateRequest is optional - when omitted, price applies as base price
  • Reference OpenAPI spec at docs/openapi/latest.json for request/response schemas

Related Issues

  • #324 - Parity: Subscriptions (covers price-points but not per-territory pricing)
  • #325 - Parity: In-App Purchases (covers price schedules but not detailed implementation)

References

  • OpenAPI paths: docs/openapi/paths.txt
  • Schema: SubscriptionPriceCreateRequest includes optional territory relationship
  • Schema: InAppPurchasePriceScheduleCreateRequest for IAP pricing
Originally created by @rudrankriyam on GitHub (Jan 31, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/357 # Overview Add support for setting different prices for subscriptions and in-app purchases across different territories (countries/regions). This enables developers to implement purchasing power parity (PPP) pricing strategies, where prices are adjusted based on local economic conditions. Currently, the CLI supports adding subscription prices with a price point, but doesn't expose the `territory` relationship that the API supports. This means developers cannot set different prices for different countries programmatically. # Use Case A developer wants to price their subscription at: - $9.99 in USA - ₹299 in India (PPP-adjusted) - €8.99 in Germany - ¥980 in Japan This requires calling `POST /v1/subscriptionPrices` for each territory with the appropriate territory-specific price point. # API Documentation - [Create a Subscription Price Change](https://developer.apple.com/documentation/appstoreconnectapi/post-v1-subscriptionprices) - "Schedule a subscription price change for a specific territory" - [Subscription Price Points and Subscription Prices](https://developer.apple.com/documentation/appstoreconnectapi/subscription-price-points-and-subscription-prices) - [List All Price Points for a Subscription](https://developer.apple.com/documentation/appstoreconnectapi/list_all_price_points_for_a_subscription) Key quote from Apple docs: > "To set a price point for another territory, use POST /v1/subscriptionPrices, replacing the subscriptionPricePoint ID with values obtained from GET /v1/subscriptionPricePoints/{id}/equalizations" # Scope (OpenAPI resources) ## Subscriptions - `POST /v1/subscriptionPrices` - Create with optional `territory` relationship (**needs --territory flag**) - `DELETE /v1/subscriptionPrices/{id}` - Delete a subscription price (**not implemented**) - `GET /v1/subscriptions/{id}/prices` - List current prices (**not implemented**) - `GET /v1/subscriptionPricePoints/{id}/equalizations` - Get territory-specific price points (✅ exists) ## In-App Purchases - `POST /v1/inAppPurchasePriceSchedules` - Create with manual prices per territory (**not implemented**) - `GET /v1/inAppPurchasePriceSchedules/{id}/manualPrices` - List manual prices (**not implemented**) - `GET /v1/inAppPurchasePricePoints/{id}/equalizations` - Get territory-specific price points (**not implemented**) # Proposed CLI ## Subscriptions - New/Modified Commands ```bash # List current prices for a subscription asc subscriptions prices list --id "SUB_ID" # Add a price for a specific territory asc subscriptions prices add --id "SUB_ID" --price-point "PRICE_POINT_ID" --territory "USA" asc subscriptions prices add --id "SUB_ID" --price-point "PRICE_POINT_ID" --territory "IND" # Delete a subscription price asc subscriptions prices delete --price-id "PRICE_ID" --confirm # Get equalizations (territory-specific price points) - already exists but verify working asc subscriptions price-points equalizations --id "PRICE_POINT_ID" ``` ## In-App Purchases - New Commands ```bash # List price points for an IAP asc iap price-points list --id "IAP_ID" asc iap price-points list --id "IAP_ID" --territory "USA" # Get equalizations for IAP price points asc iap price-points equalizations --id "PRICE_POINT_ID" # Get current price schedule asc iap price-schedule get --id "IAP_ID" # Create price schedule with manual prices asc iap price-schedule create --id "IAP_ID" --base-territory "USA" --price-point "PRICE_POINT_ID" # List manual/automatic prices asc iap price-schedule manual-prices --schedule-id "SCHEDULE_ID" asc iap price-schedule automatic-prices --schedule-id "SCHEDULE_ID" ``` # Workflow Example Setting PPP-based pricing for a subscription: ```bash # 1. List price points for base territory (USA) asc subscriptions price-points list --id "SUB_ID" --territory "USA" # Returns price point ID for $9.99 tier # 2. Get equalizations to find equivalent price points in other territories asc subscriptions price-points equalizations --id "eyJzIjoiNjY..." # Returns price points for all territories with their local prices # 3. Find the India price point that matches your PPP target (e.g., ₹299) # Use the price point ID from equalizations # 4. Set the price for India asc subscriptions prices add --id "SUB_ID" --price-point "IND_PRICE_POINT_ID" --territory "IND" # 5. Repeat for other territories asc subscriptions prices add --id "SUB_ID" --price-point "DEU_PRICE_POINT_ID" --territory "DEU" ``` # Flag Patterns Common: - `--id`, `--price-id`, `--schedule-id`, `--output`, `--pretty`, `--limit`, `--next`, `--paginate`, `--confirm` New flags: - `--territory` - Territory ID (e.g., USA, IND, DEU, JPN) - `--price-point` - Price point ID - `--base-territory` - Base territory for price schedules # Output - JSON minified by default - `--pretty` for JSON - `--output table/markdown` for list commands # Detailed TODO ## Subscriptions - [ ] Add `--territory` flag to `subscriptions prices add` command - [ ] Update client method `CreateSubscriptionPrice` to accept territory relationship - [ ] Add `subscriptions prices list` command + client method - [ ] Add `subscriptions prices delete` command + client method - [ ] Verify `subscriptions price-points equalizations` works correctly ## In-App Purchases - [ ] Add `iap price-points list` command + client method - [ ] Add `iap price-points equalizations` command + client method - [ ] Add `iap price-schedule get` command + client method - [ ] Add `iap price-schedule create` command + client method (with manual prices support) - [ ] Add `iap price-schedule manual-prices` command + client method - [ ] Add `iap price-schedule automatic-prices` command + client method ## General - [ ] Add cmdtests for all new commands - [ ] Add HTTP client tests (mocked) - [ ] Update documentation # Acceptance Criteria - [ ] Can list current subscription prices per territory - [ ] Can add subscription price for a specific territory - [ ] Can delete a subscription price - [ ] Can list IAP price points with territory filter - [ ] Can get IAP price point equalizations - [ ] Can create/manage IAP price schedules - [ ] Pagination works for all list commands - [ ] All commands have proper error handling and validation # Tests - Flag validation tests (missing required flags, invalid territory codes) - HTTP client tests for all new endpoints - Integration tests showing full PPP pricing workflow - Output format tests (json, table, markdown) # Implementation Notes - Add/modify client methods in `internal/asc/client_subscriptions.go` and `internal/asc/client_iap.go` - Add CLI commands in `internal/cli/subscriptions/` and `internal/cli/iap/` - Follow patterns from existing `subscriptions prices add` command - The `territory` relationship in `SubscriptionPriceCreateRequest` is optional - when omitted, price applies as base price - Reference OpenAPI spec at `docs/openapi/latest.json` for request/response schemas # Related Issues - #324 - Parity: Subscriptions (covers price-points but not per-territory pricing) - #325 - Parity: In-App Purchases (covers price schedules but not detailed implementation) # References - OpenAPI paths: `docs/openapi/paths.txt` - Schema: `SubscriptionPriceCreateRequest` includes optional `territory` relationship - Schema: `InAppPurchasePriceScheduleCreateRequest` for IAP pricing
kerem closed this issue 2026-02-26 21:33:25 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Jan 31, 2026):

@cursor Please implement this feature. Start with the subscription pricing commands (adding --territory flag, list, and delete), then move to the IAP pricing commands. Follow the existing patterns in the codebase and ensure all commands have proper tests.

<!-- gh-comment-id:3828167460 --> @rudrankriyam commented on GitHub (Jan 31, 2026): @cursor Please implement this feature. Start with the subscription pricing commands (adding --territory flag, list, and delete), then move to the IAP pricing commands. Follow the existing patterns in the codebase and ensure all commands have proper tests.
Author
Owner

@cursor[bot] commented on GitHub (Jan 31, 2026):

Summary:

  • I added per‑territory subscription pricing support (new --territory flag), plus subscriptions prices list/delete commands with pagination and table/markdown output; the ASC client now supports list/delete endpoints and territory relationships, with new output formatting and tests.
  • I added IAP pricing enhancements: iap price-points now supports --territory filtering and equalizations, and iap price-schedules now includes manual-prices / automatic-prices list commands with pagination and table/markdown output, plus client/query/pagination support and tests.

Tests & validation:

  • make test
  • Manual CLI help walkthrough recorded in the artifact below (shows new subcommands and territory flags).

Walkthrough artifact:

  • cli_pricing_commands_help/recording_demo.mp4 (terminal demo of new pricing commands/flags)

View PR
Open in Cursor Open in Web

<!-- gh-comment-id:3828167539 --> @cursor[bot] commented on GitHub (Jan 31, 2026): Summary: - I added per‑territory subscription pricing support (new `--territory` flag), plus `subscriptions prices list/delete` commands with pagination and table/markdown output; the ASC client now supports list/delete endpoints and territory relationships, with new output formatting and tests. - I added IAP pricing enhancements: `iap price-points` now supports `--territory` filtering and `equalizations`, and `iap price-schedules` now includes `manual-prices` / `automatic-prices` list commands with pagination and table/markdown output, plus client/query/pagination support and tests. Tests & validation: - `make test` - Manual CLI help walkthrough recorded in the artifact below (shows new subcommands and territory flags). Walkthrough artifact: - `cli_pricing_commands_help/recording_demo.mp4` (terminal demo of new pricing commands/flags) <a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/360"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-pr-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-pr-light.png"><img alt="View PR" width="86" height="28" src="https://cursor.com/assets/images/view-pr-light.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-1aaea42b-3821-49c6-b300-4e98cd7de2ff"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-1aaea42b-3821-49c6-b300-4e98cd7de2ff"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>
Author
Owner

@rudrankriyam commented on GitHub (Jan 31, 2026):

Closed by PR #358: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/358

<!-- gh-comment-id:3828195883 --> @rudrankriyam commented on GitHub (Jan 31, 2026): Closed by PR #358: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/358
Author
Owner

@rudrankriyam commented on GitHub (Jan 31, 2026):

Reopening: PR #358 was not intended to close this issue. Previous closure was a mistake.

<!-- gh-comment-id:3828197954 --> @rudrankriyam commented on GitHub (Jan 31, 2026): Reopening: PR #358 was not intended to close this issue. Previous closure was a mistake.
Author
Owner

@rudrankriyam commented on GitHub (Jan 31, 2026):

Closed with #360

<!-- gh-comment-id:3828314977 --> @rudrankriyam commented on GitHub (Jan 31, 2026): Closed with #360
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#104
No description provided.