agentleFS
yasserstudioyasserstudio/gpc-skills/gpc-monetization/SKILL.md

gpc-monetization

Skill1 starsChanged 17 days agoMITView on GitHub

Use when managing in-app purchases, subscriptions, pricing, or Real-Time Developer Notifications in Google Play. Make sure to use this skill whenever the user mentions gpc subscriptions, gpc iap, gpc purchases, gpc pricing, gpc rtdn, in-app products, base plans, subscription offers, one-time products, consumable products, purchase verification, purchase acknowledgement, purchase token, subscription cancellation, subscription deferral, voided purchases, refunds, regional pricing, currency conversion, price migration, SKU management, monetization, revenue, billing, subscription analytics, churn, trial conversion, subscriber count, RTDN, Real-Time Developer Notifications, Pub/Sub notifications, subscription events, purchase events — even if they don't explicitly say 'monetization.' Also trigger when someone wants to create or update subscriptions, manage base plan lifecycle (activate/deactivate), set up introductory offers, verify server-side purchases, handle refunds, convert prices across regions, sync IAP products from files, migrate subscribers to new prices, view subscription analytics, decode Pub/Sub notification payloads, create retention offers for subscribers who start to cancel (retention offer, win-back discount, cancellation offer, retentionRule, retentionPerUserRule, target-offer, untarget-offer, plan transition, SUBSCRIPTION_PLAN_TRANSITION_UPDATED, cancel-transition), respond to a chargeback dispute (chargeback, pending refund review, pendingRefundReviewNotification, pendingRefundToken, gpc purchases orders review-refund), or check RTDN topic configuration. For release management, see gpc-release-flow. For CI automation, see gpc-ci-integration.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a JSON file defining the subscription, then:

    line 61
  2. Very specific:

    All base plan commands support --dry-run.

    line 126
  3. Very specific:

    After acceptance: RTDN SUBSCRIPTION_PLAN_TRANSITION_UPDATED (type 21) arrives, the purchase token is unchanged (nothing to acknowledge), …

    line 181
  4. Very specific:

    All batch commands support --dry-run and --json.

    line 337
  5. Very specific:

    All write operations support --dry-run.

    line 429
  6. Very specific:

    When a user disputes a charge with their bank, Play sends a pendingRefundReviewNotification RTDN carrying a pendingRefundToken and the …

    line 441

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 status must show valid credentials
  • App package name — set via --app or gpc 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 show

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"

Fixed in v0.9.84: --regions-version is now actually sent to the Google Play API on subscriptions and one-time-products create, update, and offer commands. In v0.9.77-v0.9.83 it was accepted by GPC but silently ignored. Default is 2022/02 if not specified. IAP and subscription list --json also now use the unified { <key>, nextPageToken, meta.count } envelope (GPC v0.9.83).

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

The --update-mask flag controls which fields are updated. Omit it to replace the entire subscription.

D. Batch operations

# Batch-get several offers of one base plan
gpc subscriptions offers batch-get <product-id> <base-plan-id> --ids "offer_a,offer_b"

# Activate or deactivate several offers of one base plan from JSON
gpc subscriptions offers batch-update-states <product-id> <base-plan-id> --file offer-states.json --dry-run
gpc subscriptions offers batch-update-states <product-id> <base-plan-id> --file offer-states.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

# 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>

Retention offers (v1.2.0+)

A retention offer is a discount Google Play shows to a subscriber who starts to cancel, only inside Play subscription management (never in the app, never through launchBillingFlow). Two kinds: cohort (targeting.retentionRule, Play applies your rules) and per-user (targeting.retentionPerUserRule: {}, your backend targets single purchases).

# Cohort: 50% off for 2 billing periods, for subscribers of 90+ days. Created as DRAFT.
gpc subscriptions offers create premium_monthly p1m --retention cohort \
  --offer-id winback-50 --discount 0.5 --periods 2 --min-duration 90d
gpc subscriptions offers activate premium_monthly p1m winback-50

# Per-user: create and activate in one step, then target one purchase token
gpc subscriptions offers create premium_monthly p1m --retention per-user \
  --offer-id save-30 --discount 0.3 --activate
gpc purchases subscription target-offer <token> --offer save-30
gpc purchases subscription untarget-offer <token> --offer save-30

# Starter JSON for --file (offline)
gpc subscriptions offers template retention [--per-user]

# Change one cohort setting without a file (GPC builds the update mask)
gpc subscriptions offers update premium_monthly p1m winback-50 --min-duration 30d --end 2027-03-01T00:00:00Z

Rules GPC checks locally before sending (all problems listed at once, exit 2): --discount is a fraction 0 < x < 1 (0.5 = 50% off; 50 is refused and suggests 0.5); one phase of 1 to 52 billing periods; durations in days only (90d or P90D, 0 to 1826); --cooldown required with --multiple-claims and refused without it; --end in the future and after the start. --retention copies the base plan's billing period and regions (so the base plan must be auto-renewing). --multiple-claims/--cooldown/--min-duration are cohort only.

Per-user targeting is stored by Google until untargeted or 60 days after expiry, does not carry over to a new purchase token, and both calls are idempotent. The offer must have been activated at least once.

After acceptance: RTDN SUBSCRIPTION_PLAN_TRANSITION_UPDATED (type 21) arrives, the purchase token is unchanged (nothing to acknowledge), and gpc purchases subscription get <token> shows a planTransition row (lineItems[].autoRenewingPlan.planTransitionDetails in JSON). The discount starts at the next renewal (RTDN type 2). gpc purchases subscription cancel-transition <token> --product-id <id> cancels a pending transition and is experimental (outside the semver promise).

Google picks one offer per cancellation: per-user over cohort, then highest discount %, then lowest price, then alphabetically last offer ID. Full guide: https://yasserstudio.github.io/gpc/guide/retention-offers

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 --limit 50
gpc iap list --limit 50 --next-page <page-token>

gpc iap get <sku>

gpc iap list supports --limit and --next-page for paginated results. The --json response includes a nextPageToken field 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 (defaults to 2022/02); the one-time-products commands take it
gpc one-time-products 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

# Delete
gpc iap delete <sku>

Read: references/iap-schema.md for the JSON structure and field reference.

C. Batch get and update

# Get several IAP products at once
gpc iap batch-get --skus "sku_a,sku_b,sku_c"

# Update several IAP products from one JSON file
gpc iap batch-update --file products.json --dry-run
gpc iap batch-update --file products.json

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.

One-time product offers -- single-offer commands (v0.9.96)

Google Play publishes only batch endpoints for one-time product offers, so otp offers get, create, update, and delete are sent as single-item batch requests and require --purchase-option. Omitting it fails immediately as a missing-option error, before any API call. The - wildcard works only with offers list -- run that first if you do not know which purchase option an offer belongs to.

# Find the purchase option an offer belongs to
gpc otp offers list premium_upgrade

gpc otp offers get premium_upgrade launch_discount --purchase-option buy_once
gpc otp offers create premium_upgrade --file offer.json --purchase-option buy_once
gpc otp offers update premium_upgrade launch_discount --file offer-update.json --purchase-option buy_once
gpc otp offers delete premium_upgrade launch_discount --purchase-option buy_once

offers create probes for the offer ID first and refuses with API_ALREADY_EXISTS (409) rather than overwriting -- the underlying batch endpoint is an upsert. Use offers update to change an existing offer.

Fixed in v0.9.96: gpc one-time-products create / update and the four single-offer commands above previously failed with a route-not-found error (Play serves the write route under a different spelling than the read routes). Requires v0.9.96+.

One-time product offer payload (Google's schema)

An offer file is a Google Play OneTimeProductOffer: one of discountedOffer, preOrderOffer or gameRewardOffer, plus regionalPricingAndAvailabilityConfigs as a list of { regionCode, availability, relativeDiscount | absoluteDiscount | noOverride }. relativeDiscount is the fraction the user pays (0.7 = 30% off); prices themselves live on the purchase option. Do not use subscription fields (pricingPhases, a regionalConfigs map, newSubscriberAvailability) -- Google rejects them, and GPC docs before v0.9.99 showed that wrong shape.

{
  "offerId": "launch-discount",
  "discountedOffer": { "startTime": "2026-10-01T00:00:00Z", "endTime": "2026-10-31T23:59:59Z", "redemptionLimit": "1000" },
  "regionalPricingAndAvailabilityConfigs": [
    { "regionCode": "US", "availability": "AVAILABLE", "relativeDiscount": 0.7 }
  ]
}

Play Games Rewards (v0.9.99+ typed/documented): "gameRewardOffer": { "redemptionLimit": "1" } ("1"-"50", "0"/unset = unlimited). Google's guide creates rewards offers in Play Console; GPC lists, reads and updates them.

External transactions (alternative billing, US programs)

gpc ext-txn create --file txn.json --transaction-id order-1001    # body sent as-is
gpc ext-txn get order-1001
gpc ext-txn refund order-1001 --full
gpc ext-txn refund order-1001 --partial-amount 4990000 --currency EUR --refund-id order-1001-r1
  • Refunds need GPC v0.9.99+: earlier versions never sent Google's required refundTime (and partial refundId), so Google rejected them. --refund-time <RFC 3339 with zone> overrides "now"; future times are refused. Bad options exit 2 with EXT_TXN_REFUND_INVALID before anything is sent, and the prompt states the amount.
  • --partial-amount is pre-tax micros (4990000 = 4.99), not major units.
  • From v1.0.0-rc.1 a refund without a terminal needs --yes, or it exits 2 with CONFIRMATION_REQUIRED.
  • US external content links program: add externalContentLinkDetails { linkType: LINK_TO_DIGITAL_CONTENT_OFFER | LINK_TO_APP_DOWNLOAD, installedAppPackage, externalAppCategory: APP | GAME } to the create file (separate from the older externalOfferDetails). Google requires reporting purchases from Oct 1 2026 and app downloads by Dec 1 2026.

Activating/deactivating OTP offers

One-time product offer states change through batch-update-states (there is no single-offer activate/deactivate command). Every offer command takes --purchase-option <id>:

gpc otp offers batch-update-states <product-id> --purchase-option <po-id> --file otp-states.json --dry-run
gpc otp offers batch-update-states <product-id> --purchase-option <po-id> --file otp-states.json

# Cancel a single offer
gpc otp offers cancel <product-id> <offer-id> --purchase-option <po-id>

OTP offer and purchase-option batch operations (v0.9.79+)

Batch operations on one-time product offers and purchase options:

# Retrieve multiple OTP offers in one call (offer ids in the JSON file)
gpc one-time-products offers batch-get <product-id> --purchase-option <po-id> --file otp-offer-ids.json

# Update multiple OTP offers from JSON
gpc one-time-products offers batch-update <product-id> --purchase-option <po-id> --file otp-offers.json --dry-run
gpc one-time-products offers batch-update <product-id> --purchase-option <po-id> --file otp-offers.json

# Bulk activate or deactivate OTP offers
gpc one-time-products offers batch-update-states <product-id> --purchase-option <po-id> --file otp-states.json --dry-run
gpc one-time-products offers batch-update-states <product-id> --purchase-option <po-id> --file otp-states.json

# Delete multiple OTP offers at once
gpc one-time-products offers batch-delete <product-id> --purchase-option <po-id> --file otp-offer-ids.json --dry-run
gpc one-time-products offers batch-delete <product-id> --purchase-option <po-id> --file otp-offer-ids.json

# Bulk delete purchase options of a product
gpc one-time-products purchase-options batch-delete <product-id> --file po-delete.json --dry-run
gpc one-time-products purchase-options batch-delete <product-id> --file po-delete.json

# Bulk update purchase-option states (activate/deactivate)
gpc one-time-products purchase-options batch-update-states <product-id> --file po-states.json --dry-run
gpc one-time-products purchase-options batch-update-states <product-id> --file po-states.json

All batch commands support --dry-run and --json. These operations cover the full v0.9.79 OTP batch surface: 4 offer methods (batch-get, batch-update, batch-update-states, batch-delete) and 2 purchase-option methods (batch-delete, batch-update-states).

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 (required within 3 days): there is no
# subscription-specific acknowledge command; `gpc purchases acknowledge` covers
# one-time products only. Acknowledge subscriptions from your backend.

# Get subscription purchase details (v2 API)
# Returns SubscriptionPurchaseV2 with onHoldStateContext, inGracePeriodStateContext (v0.9.76+)
# Both context objects are surfaced in --json output and structured display
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> --duration 2592000   # seconds (30 days)

# 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"

New in v0.9.79: Orders now expose an OfferPhaseDetails type that replaces the flat offerPhase field. OfferPhaseDetails is a structured object with richer phase information (phase type, cycle counts, and pricing details). The flat offerPhase field is deprecated; read from offerPhaseDetails in new code.

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 (always a full refund; --revoke also removes the entitlement)
gpc purchases orders refund <order-id> --yes
gpc purchases orders refund <order-id> --revoke --yes

# Partial subscription refunds go through the v2 revoke instead
gpc purchases subscription revoke <token> --refund-type prorated --yes

orders refund takes only --revoke: Google's orders.refund is a full refund and has no partial or prorated form. purchases subscription revoke is where the choice lives, via --refund-type full|prorated|item (default prorated); --refund-type item also needs --product-id.

New in v0.9.47: --type 0 (default) returns only in-app purchase voids. --type 1 includes subscription voids. --include-partial-refunds includes quantity-based partial refunds.

All write operations support --dry-run.

Money commands need --yes in CI (v1.0.0-rc.1+)

purchases orders refund, purchases orders review-refund, purchases subscription revoke and external-transactions refund move money and cannot be undone. When they run without a terminal (CI, piped stdin, --no-interactive) they now stop with CONFIRMATION_REQUIRED (exit 2) unless --yes is passed. Earlier versions confirmed them automatically, so a pipeline could issue a refund by default. --dry-run sends nothing and is exempt. In an interactive shell the prompt is unchanged.

From v1.2.0 the same rule covers purchases subscription cancel, cancel-v2, defer, defer-v2, target-offer and untarget-offer, because they change what a subscriber pays. A CI job that runs them must add --yes.

Read: references/purchase-verification.md for server-side verification patterns and best practices.

F. Chargeback disputes -- purchases orders review-refund (v0.9.96+)

When a user disputes a charge with their bank, Play sends a pendingRefundReviewNotification RTDN carrying a pendingRefundToken and the disputed orderId. You have 24 hours to answer. Play decides the outcome; your preference and evidence are inputs to that decision, not the decision itself.

# 1. Pull the token out of the notification (full token only in JSON output)
TOKEN=$(gpc rtdn decode "<base64-payload>" --output json \
  | jq -r .pendingRefundReviewNotification.pendingRefundToken)

# 2. Answer the dispute
gpc purchases orders review-refund "GPA.1234-5678-9012-34567" \
  --app com.example.app \
  --pending-refund-token "$TOKEN" \
  --preference decline \
  --sample-content-provided \
  --consumption-percent 82 \
  --usage-events-file ./usage-events.json

# Take no side, no evidence
gpc purchases orders review-refund "GPA.1234-5678-9012-34567" \
  --pending-refund-token "$TOKEN" \
  --preference neutral \
  --no-sample-content-provided
FlagRequiredNotes
--pending-refund-tokenyesToken from the pendingRefundReviewNotification
--preferenceyesapprove, decline, or neutral
--sample-content-provided / --no-sample-content-providedyes (exactly one)Whether a free sample, trial, or functionality info was offered before purchase. Google has no default, so GPC makes you state it
--consumption-percentnoHow much was consumed, 0-100, decimals allowed (sent as milliunits)
--usage-events-filenoJSON array of consumption usage events, max 1,000

usage-events.json uses RFC 3339 timestamps, and location.regionCode is a required CLDR region code whenever a location is supplied:

[
  {
    "consumptionTime": "2026-08-30T10:15:00Z",
    "consumptionItemDescription": "Opened chapter 4",
    "obfuscatedAccountId": "user-account-id",
    "ipAddress": "203.0.113.10",
    "location": { "regionCode": "US" }
  }
]

Bad input is rejected locally as ORDER_REVIEW_REFUND_INVALID (exit 2) before anything is sent. An empty or whitespace-only --consumption-percent counts as not provided, so a typo never claims "0% consumed" on your behalf. --dry-run previews the request.

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 decode to inspect payloads.

New in v0.9.96: gpc rtdn decode recognises pendingRefundReviewNotification (a chargeback sent for your review) and surfaces its orderId and pendingRefundToken -- the full token is printed only with --output json. It also no longer crashes on a partial chargeback notification. Answer within 24 hours with gpc purchases orders review-refund (section 5F).

v1.2.0: SUBSCRIPTION_PLAN_TRANSITION_UPDATED (type 21) means a subscriber accepted a retention offer or another plan transition is pending. Read it with gpc purchases subscription get <token> (the planTransition row). See "Retention offers" in section 3.

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.

10. Data safety (v0.9.75+)

Manage your app's Data Safety section declarations via the API:

# Get current data safety labels
gpc data-safety get

# Update data safety declarations from CSV
gpc data-safety update --file safety.csv

Verification

  • gpc subscriptions list returns your subscriptions
  • gpc iap list returns your in-app products
  • gpc purchases get <product-id> <token> returns v1 purchase details for a valid token
  • gpc purchases product get-v2 <token> returns v2 purchase details with line items
  • gpc purchases orders get <order-id> returns order details
  • gpc pricing convert --from USD --amount 9.99 --json returns regional prices
  • All --dry-run commands show what would change without modifying data
  • JSON output works on all commands (--json flag)

Failure modes / debugging

SymptomLikely CauseFix
PRODUCT_NOT_FOUNDInvalid product ID or SKUVerify with gpc subscriptions list or gpc iap list
INVALID_PURCHASE_TOKENToken expired, already consumed, or wrong appVerify token matches the app and product
PURCHASE_NOT_ACKNOWLEDGEDPurchase not acknowledged within 3 daysAcknowledge immediately; if >3 days, purchase was auto-refunded
SUBSCRIPTION_NOT_FOUNDWrong subscription ID in cancel/deferUse gpc purchases subscription get <token> to find the correct ID
INVALID_JSON in create/updateMalformed product JSON fileValidate JSON structure against the schema reference
PERMISSION_DENIED on purchasesService account lacks financial permissionsGrant "View financial data" and "Manage orders" in Play Console
--update-mask errorInvalid field path in update maskCheck API docs for valid field names; omit flag to replace all fields
iap sync deletes unexpected productsDirectory missing some product filesUse --dry-run first; sync deletes products not in the directory
Missing --purchase-option on otp offers get/create/update/deletev0.9.96 routes these through Play's batch offer endpoints, which need a concrete purchase optionRun gpc otp offers list <product-id> to find it; - works only on list
API_ALREADY_EXISTS on otp offers createThat offer ID already exists; the batch endpoint is an upsert, so GPC probes and refuses rather than overwritingUse gpc otp offers update instead
RETENTION_FLAG_INVALID / RETENTION_OFFER_INVALID (exit 2)A retention flag or offer file breaks Google's rules; nothing was sentFollow the suggestion (for example --discount 0.5); start a file from gpc subscriptions offers template retention
BASE_PLAN_NOT_FOUND (exit 2)No base plan with that ID on the subscriptionUse an ID from gpc subscriptions get <product-id>
OFFER_ACTIVATE_FAILED (exit 4)--activate failed after the draft was createdRun the offers activate command printed in the error
OFFER_NOT_PER_USER / OFFER_NEVER_ACTIVATED (exit 4)target-offer on a cohort offer, or on an offer never activatedTarget only retentionPerUserRule offers; activate the offer once first
ORDER_REVIEW_REFUND_INVALID--sample-content-provided unanswered, --consumption-percent outside 0-100, or --usage-events-file is not a JSON array of objectsPass one of --sample-content-provided / --no-sample-content-provided, use a plain decimal, and make the file an array

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.