In-app products, subscriptions, base plans, and offers setup for Google Play monetization. Use when configuring in-app purchases or subscription products.
Install
npx skillscat add tamtom/gplay-cli-skills/gplay-iap-setup Install via the SkillsCat registry.
This skill enables developers to configure in-app purchases, subscriptions, and offers for Google Play monetization. It solves the problem of managing product listings, pricing, and regional configurations through CLI commands. Use it when setting up or modifying monetization features in Android apps.
In-App Purchase Setup for Google Play
Use this skill when you need to set up monetization for your Android app.
Product Types
- In-App Products - One-time or consumable purchases
- Subscriptions - Recurring billing with base plans and offers
In-App Products (IAP)
List products
gplay iap list --package com.example.appCreate product
gplay iap create \
--package com.example.app \
--sku premium_upgrade \
--json @product.jsonproduct.json
{
"sku": "premium_upgrade",
"status": "active",
"purchaseType": "managedUser",
"defaultPrice": {
"priceMicros": "990000",
"currency": "USD"
},
"prices": {
"US": {
"priceMicros": "990000",
"currency": "USD"
},
"GB": {
"priceMicros": "799000",
"currency": "GBP"
}
},
"listings": {
"en-US": {
"title": "Premium Upgrade",
"description": "Unlock all premium features"
},
"es-ES": {
"title": "Actualización Premium",
"description": "Desbloquea todas las funciones premium"
}
}
}Update product
gplay iap update \
--package com.example.app \
--sku premium_upgrade \
--json @product-updated.jsonBatch operations
# Update multiple products
gplay iap batch-update \
--package com.example.app \
--json @products.json
# Get multiple products
gplay iap batch-get \
--package com.example.app \
--skus "premium,coins_100,coins_500"Delete product
gplay iap delete \
--package com.example.app \
--sku premium_upgrade \
--confirmSubscriptions
List subscriptions
gplay subscriptions list --package com.example.appCreate subscription
gplay subscriptions create \
--package com.example.app \
--json @subscription.jsonsubscription.json
{
"productId": "premium_monthly",
"basePlans": [
{
"basePlanId": "monthly",
"state": "ACTIVE",
"regionalConfigs": [
{
"regionCode": "US",
"price": {
"priceMicros": "4990000",
"currency": "USD"
}
}
],
"autoRenewingBasePlanType": {
"billingPeriodDuration": "P1M"
}
},
{
"basePlanId": "yearly",
"state": "ACTIVE",
"regionalConfigs": [
{
"regionCode": "US",
"price": {
"priceMicros": "49990000",
"currency": "USD"
}
}
],
"autoRenewingBasePlanType": {
"billingPeriodDuration": "P1Y"
}
}
],
"listings": {
"en-US": {
"title": "Premium Subscription",
"description": "Get all premium features"
}
}
}Base Plans
Base plans define the billing period and price for subscriptions.
Activate base plan
gplay baseplans activate \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthlyDeactivate base plan
gplay baseplans deactivate \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthlyMigrate prices
gplay baseplans migrate-prices \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthly \
--json @migration.jsonSubscription Offers
Offers provide discounts, free trials, or introductory pricing.
List offers
gplay offers list \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthlyCreate offer
gplay offers create \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthly \
--json @offer.jsonoffer.json (Free trial)
{
"offerId": "trial_7day",
"state": "ACTIVE",
"phases": [
{
"duration": "P7D",
"pricingType": "FREE_TRIAL"
}
],
"regionalConfigs": [
{
"regionCode": "US"
}
]
}offer.json (Introductory price)
{
"offerId": "intro_50_off",
"state": "ACTIVE",
"phases": [
{
"duration": "P1M",
"pricingType": "SINGLE_PAYMENT",
"price": {
"priceMicros": "2490000",
"currency": "USD"
}
}
]
}Activate/Deactivate offer
# Activate
gplay offers activate \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthly \
--offer-id trial_7day
# Deactivate
gplay offers deactivate \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthly \
--offer-id trial_7dayRegional Pricing
Convert prices
gplay pricing convert \
--package com.example.app \
--json @price-request.jsonprice-request.json
{
"basePriceMicros": "4990000",
"baseCurrency": "USD",
"targetCurrencies": ["GBP", "EUR", "JPY"]
}Common Monetization Patterns
Pattern 1: Simple IAP
# One-time premium upgrade
gplay iap create \
--package com.example.app \
--sku premium_unlock \
--json @premium.jsonPattern 2: Consumable IAP
# Coins/gems that can be consumed
gplay iap create \
--package com.example.app \
--sku coins_100 \
--json @coins.jsonPattern 3: Subscription with Free Trial
# 1. Create subscription
gplay subscriptions create \
--package com.example.app \
--json @sub.json
# 2. Create free trial offer
gplay offers create \
--package com.example.app \
--product-id premium \
--base-plan monthly \
--json @trial.jsonPattern 4: Multi-Tier Subscription
{
"productId": "premium",
"basePlans": [
{
"basePlanId": "basic_monthly",
"price": {"priceMicros": "2990000", "currency": "USD"},
"billingPeriodDuration": "P1M"
},
{
"basePlanId": "premium_monthly",
"price": {"priceMicros": "4990000", "currency": "USD"},
"billingPeriodDuration": "P1M"
},
{
"basePlanId": "premium_yearly",
"price": {"priceMicros": "49990000", "currency": "USD"},
"billingPeriodDuration": "P1Y"
}
]
}Testing
Use test purchases
In your app code, use test product IDs:
android.test.purchasedandroid.test.canceledandroid.test.refundedandroid.test.item_unavailable
License testing
Add test accounts in Play Console:
Settings → License Testing → Add license testers
Best Practices
- Use clear product IDs - e.g.,
premium_monthly, notprod_001 - Localize descriptions - Provide listings for all supported languages
- Set up regional pricing - Don't use same price everywhere
- Offer free trials - Increase conversion rates
- Test thoroughly - Use test accounts and test product IDs
- Monitor conversions - Track which products/offers perform best
- Update prices carefully - Price changes affect existing subscribers
Billing Periods
P1W- 1 weekP1M- 1 monthP3M- 3 monthsP6M- 6 monthsP1Y- 1 year