iap
Manage legacy in-app products (one-time purchases, consumables, non-consumables).
Legacy API
These commands use the older in-app products API. For new products, use gpc otp instead — it provides richer features including regional pricing, product tags, and offer management.
Commands
| Command | Description |
|---|---|
iap list | List in-app products |
iap get | Get an in-app product by SKU |
iap create | Create an in-app product from JSON |
iap update | Update an in-app product from JSON |
iap delete | Delete an in-app product |
iap sync | Sync in-app products from a directory of JSON files |
iap list
List all in-app products for the app.
Synopsis
gpc iap list [options]Options
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--max | number | Maximum results per page | ||
--limit | number | Maximum total results | ||
--next-page | string | Resume from pagination token |
Example
gpc iap list --app com.example.myapp{
"inappproduct": [
{
"sku": "coins_100",
"status": "active",
"purchaseType": "managedUser",
"defaultPrice": { "priceMicros": "990000", "currency": "USD" },
"listings": {
"en-US": { "title": "100 Coins", "description": "A pack of 100 coins" }
}
}
]
}Paginate results:
gpc iap list --app com.example.myapp --max 20 --next-page abc123iap get
Get details for a single in-app product by SKU.
Synopsis
gpc iap get <sku>Options
No command-specific options.
Example
gpc iap get coins_100 --app com.example.myappiap create
Create a new in-app product from a JSON file.
Synopsis
gpc iap create --file <path>Options
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--file | string | (required) | Path to JSON file with product data |
Example
Create the product JSON:
{
"sku": "coins_100",
"status": "active",
"purchaseType": "managedUser",
"defaultPrice": {
"priceMicros": "990000",
"currency": "USD"
},
"listings": {
"en-US": {
"title": "100 Coins",
"description": "A pack of 100 coins for in-game purchases."
}
},
"defaultLanguage": "en-US"
}Run the command:
gpc iap create --app com.example.myapp --file product.jsonPreview without creating:
gpc iap create --app com.example.myapp --file product.json --dry-runiap update
Update an existing in-app product from a JSON file.
Synopsis
gpc iap update <sku> --file <path>Options
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--file | string | (required) | Path to JSON file with product data |
Example
gpc iap update coins_100 \
--app com.example.myapp \
--file product-update.jsoniap delete
Delete an in-app product by SKU.
Synopsis
gpc iap delete <sku>Options
No command-specific options.
Example
gpc iap delete coins_100 --app com.example.myappPreview without deleting:
gpc iap delete coins_100 --app com.example.myapp --dry-runiap sync
Bulk sync in-app products from a directory of JSON files. Each JSON file defines one product. Products that exist are updated; missing ones are created.
Synopsis
gpc iap sync --dir <path> [options]Options
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--dir | string | (required) | Directory containing product JSON files | |
--dry-run | boolean | false | Preview changes without applying |
Example
Directory structure:
products/
coins_100.json
coins_500.json
premium_unlock.jsonSync all products:
gpc iap sync --app com.example.myapp --dir ./productsPreview sync changes:
gpc iap sync --app com.example.myapp --dir ./products --dry-run[dry-run] Would create: 1, update: 2{
"created": 1,
"updated": 2,
"unchanged": 0,
"errors": 0
}Related
- one-time-products -- Modern one-time products API (recommended for new products)
- purchase-options -- Purchase option management
- subscriptions -- Subscription products
- purchases -- Purchase verification
- pricing -- Regional price conversion