Loading...
Loading...
In-app products, subscriptions, base plans, and offers setup for Google Play monetization. Use when configuring in-app purchases or subscription products.
npx skill4agent add tamtom/gplay-cli-skills gplay-iap-setupgplay iap list --package com.example.appgplay iap create \
--package com.example.app \
--sku premium_upgrade \
--json @product.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"
}
}
}gplay iap update \
--package com.example.app \
--sku premium_upgrade \
--json @product-updated.json# 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"gplay iap delete \
--package com.example.app \
--sku premium_upgrade \
--confirmgplay subscriptions list --package com.example.appgplay subscriptions create \
--package com.example.app \
--json @subscription.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"
}
}
}gplay baseplans activate \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthlygplay baseplans deactivate \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthlygplay baseplans migrate-prices \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthly \
--json @migration.jsongplay offers list \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthlygplay offers create \
--package com.example.app \
--product-id premium_monthly \
--base-plan monthly \
--json @offer.json{
"offerId": "trial_7day",
"state": "ACTIVE",
"phases": [
{
"duration": "P7D",
"pricingType": "FREE_TRIAL"
}
],
"regionalConfigs": [
{
"regionCode": "US"
}
]
}{
"offerId": "intro_50_off",
"state": "ACTIVE",
"phases": [
{
"duration": "P1M",
"pricingType": "SINGLE_PAYMENT",
"price": {
"priceMicros": "2490000",
"currency": "USD"
}
}
]
}# 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_7daygplay pricing convert \
--package com.example.app \
--json @price-request.json{
"basePriceMicros": "4990000",
"baseCurrency": "USD",
"targetCurrencies": ["GBP", "EUR", "JPY"]
}# One-time premium upgrade
gplay iap create \
--package com.example.app \
--sku premium_unlock \
--json @premium.json# Coins/gems that can be consumed
gplay iap create \
--package com.example.app \
--sku coins_100 \
--json @coins.json# 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.json{
"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"
}
]
}android.test.purchasedandroid.test.canceledandroid.test.refundedandroid.test.item_unavailablepremium_monthlyprod_001P1WP1MP3MP6MP1Y