gpc-monetization
gpc-monetization
Manage subscriptions, in-app products, purchases, and pricing with GPC.
When to use
- Creating, updating, or deleting subscriptions and base plans
- Managing subscription offers (introductory, upgrade, winback)
- Creating, updating, or syncing in-app products (one-time purchases)
- Verifying, acknowledging, or consuming purchases server-side
- Cancelling, deferring, or revoking subscriptions
- Handling refunds and voided purchases
- Viewing subscription analytics (active, trial, churn, conversion)
- Migrating subscribers to new price points
- Converting prices across regions and currencies
Inputs required
- Authenticated GPC —
gpc auth statusmust show valid credentials - App package name — set via
--apporgpc config set app - Product JSON files — for create/update operations (subscription or IAP definitions)
- Purchase tokens — for verification, acknowledgement, and consumption
- Developer account ID — for some purchase operations (
--developer-id)
Procedure
0. Verify setup
gpc auth status
gpc config get app
Confirm auth is valid and default app is set. If not, Read: the gpc-setup skill.
1. Subscriptions
A. List and inspect subscriptions
# List all subscriptions
gpc subscriptions list
# Get details for a specific subscription
gpc subscriptions get <product-id>
# Paginated listing
gpc subscriptions list --limit 50
B. Create a subscription
Create a JSON file defining the subscription, then:
# Preview first
gpc subscriptions create --file subscription.json --dry-run
# Create
gpc subscriptions create --file subscription.json
# Specify a regions version (defaults to 2022/02)
gpc subscriptions create --file subscription.json --regions-version "2022/02"
Read: references/subscription-schema.md for the JSON structure and field reference.
C. Update a subscription
# Update specific fields
gpc subscriptions update <product-id> --file updated.json --update-mask "listings"
# Preview changes
gpc subscriptions update <product-id> --file updated.json --dry-run
# Upsert: create the subscription if it does not already exist
gpc subscriptions update <product-id> --file updated.json --allow-missing
# Control propagation speed (default: LATENCY_SENSITIVE)
gpc subscriptions update <product-id> --file updated.json --latency-tolerance LATENCY_TOLERANT
The --update-mask flag controls which fields are updated. Omit it to replace the entire subscription.
The --allow-missing flag enables upsert behavior: if the subscription does not exist, it will be created instead of returning an error.
The --latency-tolerance flag controls how quickly changes propagate. Use LATENCY_SENSITIVE (default) for immediate propagation, or LATENCY_TOLERANT when you can accept a delay in exchange for higher throughput during bulk operations.
D. Batch operations
# Batch-get multiple subscriptions at once
gpc subscriptions batch-get <id1> <id2> <id3>
# Batch-update multiple subscriptions from JSON
gpc subscriptions batch-update --file batch-updates.json --dry-run
gpc subscriptions batch-update --file batch-updates.json
E. Delete a subscription
gpc subscriptions delete <product-id> --dry-run
gpc subscriptions delete <product-id>
2. Base plans
Base plans define the billing period and pricing for a subscription.
# Activate a base plan (makes it available for purchase)
gpc subscriptions base-plans activate <product-id> <base-plan-id>
# Deactivate a base plan (stops new purchases, existing subscribers unaffected)
gpc subscriptions base-plans deactivate <product-id> <base-plan-id>
# Delete a base plan
gpc subscriptions base-plans delete <product-id> <base-plan-id>
# Migrate prices for a base plan
gpc subscriptions base-plans migrate-prices <product-id> <base-plan-id> --file prices.json
All base plan commands support --dry-run.
3. Subscription offers
Offers define promotional pricing (introductory, upgrade, winback).
# List offers for a base plan
gpc subscriptions offers list <product-id> <base-plan-id>
# Get offer details
gpc subscriptions offers get <product-id> <base-plan-id> <offer-id>
# Create an offer
gpc subscriptions offers create <product-id> <base-plan-id> --file offer.json --dry-run
gpc subscriptions offers create <product-id> <base-plan-id> --file offer.json
# Update an offer
gpc subscriptions offers update <product-id> <base-plan-id> <offer-id> --file offer.json
# Upsert: create the offer if it does not already exist
gpc subscriptions offers update <product-id> <base-plan-id> <offer-id> --file offer.json --allow-missing
# Control propagation speed for bulk offer updates
gpc subscriptions offers update <product-id> <base-plan-id> <offer-id> --file offer.json --latency-tolerance LATENCY_TOLERANT
# Activate / deactivate an offer
gpc subscriptions offers activate <product-id> <base-plan-id> <offer-id>
gpc subscriptions offers deactivate <product-id> <base-plan-id> <offer-id>
# Delete an offer
gpc subscriptions offers delete <product-id> <base-plan-id> <offer-id>
4. In-app products (IAP)
One-time purchases — consumables, non-consumables, entitlements.
A. List and inspect
gpc iap list
# Paginated listing (useful for apps with many products)
gpc iap list --page-size 50
gpc iap list --page-size 50 --next-page <page-token>
gpc iap get <sku>
New in v0.9.51:
gpc iap list(aliased asgpc one-time-products list) now supports--page-sizeand--next-pagefor paginated results. The response includes anextPageTokenfield when more results are available.
B. Create and update
# Create from JSON
gpc iap create --file product.json --dry-run
gpc iap create --file product.json
# Specify a regions version on create (defaults to 2022/02)
gpc iap create --file product.json --regions-version "2022/02"
# Update
gpc iap update <sku> --file updated.json --dry-run
gpc iap update <sku> --file updated.json
# Upsert: create the product if it does not already exist
gpc iap update <sku> --file updated.json --allow-missing
# Control propagation speed
gpc iap update <sku> --file updated.json --latency-tolerance LATENCY_TOLERANT
# Delete
gpc iap delete <sku>
Read: references/iap-schema.md for the JSON structure and field reference.
C. Batch delete
# Delete multiple IAP products at once
gpc iap batch-delete <sku1> <sku2> <sku3> --dry-run
gpc iap batch-delete <sku1> <sku2> <sku3>
D. Sync from directory
Bulk-manage IAP products from a directory of JSON files:
# Preview what would change
gpc iap sync --dir products/ --dry-run
# Apply changes
gpc iap sync --dir products/
Each JSON file in the directory represents one product. GPC compares local files against the Play Store and creates, updates, or deletes as needed.
Activating/deactivating OTP offers (v0.9.57+)
One-time product offers support explicit activation/deactivation:
gpc otp offers activate --app com.example.app --product-id sku_id --offer-id offer_id
gpc otp offers deactivate --app com.example.app --product-id sku_id --offer-id offer_id
Matches the subscription-offer lifecycle. Without this, OTP offers relied on state being set through batch update calls only.
5. Purchases — verification and lifecycle
A. Product purchases
# Verify a purchase
gpc purchases get <product-id> <token>
# Acknowledge (required within 3 days or purchase is refunded)
gpc purchases acknowledge <product-id> <token>
gpc purchases acknowledge <product-id> <token> --payload "order-123"
# Consume (for consumable products — allows re-purchase)
gpc purchases consume <product-id> <token>
B. Subscription purchases
# Acknowledge a subscription purchase (v1 — required within 3 days)
gpc purchases subscription acknowledge <subscription-id> <token>
gpc purchases subscription acknowledge <subscription-id> <token> --payload "order-456"
# Get subscription purchase details (v2 API)
gpc purchases subscription get <token>
# Cancel a subscription (v1 — requires subscription-id)
gpc purchases subscription cancel <subscription-id> <token>
# Cancel a subscription (v2 — supports cancellation types)
gpc purchases subscription cancel-v2 <token>
gpc purchases subscription cancel-v2 <token> --type DEVELOPER_CANCELED
# Defer expiry to a later date (v1)
gpc purchases subscription defer <subscription-id> <token> --expiry 2025-06-01T00:00:00Z
# Defer expiry (v2 — supports add-on subscriptions)
gpc purchases subscription defer-v2 <token> --until 2026-07-01T00:00:00Z
# Revoke a subscription (v2 API)
gpc purchases subscription revoke <token>
C. Product purchases (v2 API)
# Get product purchase details (v2 — supports multi-offer OTPs)
gpc purchases product get-v2 <token>
The v2 product purchase API returns ProductPurchaseV2 with line items, offer details, and multi-product bundle support.
D. Orders
# Get order details
gpc purchases orders get <order-id>
# Batch retrieve orders (up to 1000)
gpc purchases orders batch-get --ids "GPA.1234,GPA.5678"
E. Voided purchases and refunds
# List voided purchases (default: in-app only)
gpc purchases voided --start-time 2025-01-01 --end-time 2025-03-01
# Include subscription voids (type=1)
gpc purchases voided --type 1
# Include quantity-based partial refunds
gpc purchases voided --include-partial-refunds
# Refund an order
gpc purchases orders refund <order-id> --full-refund
gpc purchases orders refund <order-id> --prorated-refund
New in v0.9.47:
--type 0(default) returns only in-app purchase voids.--type 1includes subscription voids.--include-partial-refundsincludes quantity-based partial refunds.
All write operations support --dry-run.
Read: references/purchase-verification.md for server-side verification patterns and best practices.
6. Real-Time Developer Notifications (RTDN)
RTDN delivers Pub/Sub messages when subscription and purchase events occur. GPC can decode and inspect these notifications.
# Check RTDN topic configuration
gpc rtdn status
# Decode a base64-encoded Pub/Sub notification payload
gpc rtdn decode <base64-payload>
# Show setup instructions for RTDN
gpc rtdn test
Notification types include: SUBSCRIPTION_PURCHASED, SUBSCRIPTION_CANCELED, SUBSCRIPTION_RENEWED, SUBSCRIPTION_REVOKED, SUBSCRIPTION_EXPIRED, ONE_TIME_PRODUCT_PURCHASED, VOIDED_PURCHASE, and more.
New in v0.9.47: RTDN commands help debug subscription lifecycle events. Set up a Pub/Sub topic in GCP, configure it in Play Console > Monetization setup, and use
gpc rtdn decodeto inspect payloads.
7. Subscription analytics
Get insights on subscriber counts, conversion, and churn:
# Active subscribers, in-trial counts, trial→paid conversion, churn cohort
gpc subscriptions analytics
# JSON output for dashboards
gpc subscriptions analytics --json
Reports: active count, in-trial count, cancelled count, trial-to-paid conversion rate, estimated churn by cohort.
8. Base plan price migration
Migrate existing subscribers to a new price point:
# Migrate all subscribers on a base plan to a new price
gpc subscriptions base-plans migrate-prices <product-id> <base-plan-id> \
--file prices.json
# Prices file format: regional prices JSON (same as base plan prices)
Subscribers are notified by Google Play and must accept or cancel. Use --dry-run to preview the migration.
9. Regional pricing
Convert a base price to all Google Play supported regions:
# Convert USD 4.99 to all regional prices
gpc pricing convert --from USD --amount 4.99
# Output as JSON for scripting
gpc pricing convert --from USD --amount 4.99 --json
The conversion uses Google Play's official exchange rates and rounds to locally appropriate price points.
Verification
gpc subscriptions listreturns your subscriptionsgpc iap listreturns your in-app productsgpc purchases get <product-id> <token>returns v1 purchase details for a valid tokengpc purchases product get-v2 <token>returns v2 purchase details with line itemsgpc purchases orders get <order-id>returns order detailsgpc pricing convert --from USD --amount 9.99 --jsonreturns regional prices- All
--dry-runcommands show what would change without modifying data - JSON output works on all commands (
--jsonflag)
Failure modes / debugging
| Symptom | Likely Cause | Fix |
|---|---|---|
PRODUCT_NOT_FOUND |
Invalid product ID or SKU | Verify with gpc subscriptions list or gpc iap list |
INVALID_PURCHASE_TOKEN |
Token expired, already consumed, or wrong app | Verify token matches the app and product |
PURCHASE_NOT_ACKNOWLEDGED |
Purchase not acknowledged within 3 days | Acknowledge immediately; if >3 days, purchase was auto-refunded |
SUBSCRIPTION_NOT_FOUND |
Wrong subscription ID in cancel/defer | Use gpc purchases subscription get <token> to find the correct ID |
INVALID_JSON in create/update |
Malformed product JSON file | Validate JSON structure against the schema reference |
PERMISSION_DENIED on purchases |
Service account lacks financial permissions | Grant "View financial data" and "Manage orders" in Play Console |
--update-mask error |
Invalid field path in update mask | Check API docs for valid field names; omit flag to replace all fields |
iap sync deletes unexpected products |
Directory missing some product files | Use --dry-run first; sync deletes products not in the directory |
Related skills
- gpc-setup — authentication and configuration required before monetization commands
- gpc-release-flow — releasing app updates that include new products or pricing changes
- gpc-vitals-monitoring — monitoring reviews that mention billing issues
- gpc-ci-integration — automating IAP sync and purchase verification in CI/CD
More from yasserstudio/gpc-skills
gpc-sdk-usage
Use when building applications that programmatically interact with the Google Play Developer API using GPC's TypeScript SDK packages. Make sure to use this skill whenever the user mentions @gpc-cli/api, @gpc-cli/auth, PlayApiClient, createApiClient, resolveAuth, Google Play API client, TypeScript SDK, programmatic access, API client, HTTP client, rate limiter, pagination, edit lifecycle in code, Node.js Google Play, server-side Play Store, backend integration — even if they don't explicitly say 'SDK.' Also trigger when someone wants to build a backend service, custom dashboard, automation script, or any TypeScript/JavaScript application that interacts with Google Play programmatically rather than through the CLI. For CLI usage, see other gpc-* skills. For building plugins, see gpc-plugin-development.
12gpc-release-flow
Use when uploading, releasing, promoting, or managing rollouts on Google Play. Make sure to use this skill whenever the user mentions gpc releases, upload AAB, upload APK, staged rollout, promote to production, halt rollout, gpc publish, release notes, track management, internal testing, beta release, production rollout, version code, rollout percentage, gpc bundles, bundle list, bundle wait, wait for bundle processing, in-app update priority, retain version codes, versioned changelogs, or wants to ship an Android app to any Play Store track. Also trigger when someone asks about the Google Play edit lifecycle, release validation, or how to do a phased rollout — even if they don't mention GPC by name. For metadata and listings, see gpc-metadata-sync. For CI/CD integration, see gpc-ci-integration.
12gpc-security
Use when dealing with GPC credential security, secret management, audit logging, or access control. Make sure to use this skill whenever the user mentions credentials, service account key, secret rotation, key rotation, credential storage, audit log, audit trail, security best practices, .gpcrc.json security, secrets in CI, GPC_SERVICE_ACCOUNT safety, keychain, token cache, credential leak, key compromise, secure deployment — even if they don't explicitly say 'security.' Also trigger when someone asks about where GPC stores credentials, how to rotate service account keys, how to audit who did what with GPC, how to securely pass credentials in CI/CD, or how to handle a compromised service account key. For auth setup, see gpc-setup. For CI configuration, see gpc-ci-integration.
12gpc-multi-app
Use when managing multiple Google Play apps with GPC. Make sure to use this skill whenever the user mentions multiple apps, multi-app, monorepo, white-label, batch operations, bulk upload, several apps, --app flag, app switching, profiles for different apps, fleet management, app portfolio, multiple package names — even if they don't explicitly say 'multi-app.' Also trigger when someone has more than one Android app and wants to manage them efficiently, when they need different configurations per app, when they're running the same command across multiple apps, or when they have a monorepo with multiple Android modules. For single-app setup, see gpc-setup. For CI automation, see gpc-ci-integration.
11gpc-setup
Use when setting up GPC (Google Play Console CLI): authentication with service accounts, OAuth, or Application Default Credentials; configuration files (.gpcrc.json, env vars, XDG paths); auth profiles; running gpc doctor; troubleshooting auth errors. Make sure to use this skill whenever the user mentions gpc auth, service account setup, gpc config, gpc doctor, GPC_SERVICE_ACCOUNT, gpc auth login, Google Play API credentials, Play Console authentication, gpc setup, gpc setup wizard, one-command onboarding, or wants to install/configure GPC — even if they don't explicitly say 'setup.' Also trigger when someone is troubleshooting auth failures, token expiration, keychain issues, or proxy/network configuration for GPC.
11gpc-metadata-sync
Use when managing Google Play store listings, metadata, screenshots, or images. Make sure to use this skill whenever the user mentions gpc listings, store listing, metadata sync, screenshots, Fastlane metadata, localization, app description, pull listings, push listings, feature graphic, Play Store images, app title, short description, full description, changelogs, image sync, image dedup, listings images sync, or wants to update any text or visual content on their Play Store page. Also trigger when someone asks about migrating from Fastlane supply, syncing metadata to/from local files, managing multi-language listings, or bulk-updating store content — even if they don't mention GPC explicitly. For releases and uploads, see gpc-release-flow.
11