Logo de Play Developer Api Reference

Play Developer Api Reference

Organização
RevenueCat
play-developer-api-reference

Use this skill as a quick reference for billing related Google Play Developer API REST endpoints, covering purchases.products, purchases.subscriptionsv2, purchases.voidedpurchases, and monetization endpoints. Lists paths, auth scopes, and typical request shapes.

Visão geral

Publicado porRevenueCat
Repositórioplay-billing-skills
Nome da habilidadeplay-developer-api-reference
Estrelas
58
Forks
0
Arquivos incluídos
Somente instruções
LicençaApache-2.0
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por RevenueCat no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Play Developer Api Reference no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/play-developer-api-reference
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/RevenueCat/play-billing-skills.git /tmp/play-billing-skills
mkdir -p .claude/skills
cp -r /tmp/play-billing-skills/google-play/play-developer-api-reference .claude/skills/play-developer-api-reference
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Play Developer Api Reference em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Play Developer Api Reference automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Play Developer Api Reference não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Google Play Developer API Quick Reference

Phase 0: Intent

Use this skill when you need to look up a Google Play Developer API endpoint used for billing, subscription lifecycle management, one time product handling, refunds, voided purchase reconciliation, or catalog management. The skill returns exact REST paths, HTTP methods, response field names, query parameters, and auth scopes so you can build or debug server side calls against androidpublisher.googleapis.com.

Typical questions this skill answers:

  • Which endpoint returns the current state of a subscription token?
  • How do I cancel, revoke, or defer a subscription from the backend?
  • What fields does SubscriptionPurchaseV2 return?
  • Which path consumes or acknowledges a one time product?
  • How do I page through voided purchases?
  • What monetization endpoints manage subscriptions, base plans, and offers?
  • Which quota bucket applies to my call?

Phase 1: Locate

All endpoint tables, response field schemas, and quota guidance live in the full appendix on revenuecat.com. Jump directly to the section that matches your use case:

You want to...Go to section
Inspect or mutate a subscription purchaseSubscription Purchases
Read fields on a subscription responseSubscriptionPurchaseV2 Response (Key Fields)
Inspect, acknowledge, or consume a one time productOne Time Product Purchases
Read fields on a product purchase responseProductPurchase Response (Key Fields)
Issue a refundOrders
Reconcile refunds or chargebacksVoided Purchases
Query parameters for the voided purchases listQuery Parameters for Voided Purchases
Manage subscription productsCatalog Management: Subscriptions
Manage base plansCatalog Management: Base Plans
Manage offersCatalog Management: Offers
Manage a one time product (the default surface)Catalog Management: One Time Products (monetization.onetimeproducts)
Manage a legacy one time product never migrated off inappproductsLegacy One Time Products (inappproducts)
Understand quota bucketsRate Limiting

Phase 2: Reference

Base URL for every endpoint:

text
https://androidpublisher.googleapis.com/androidpublisher/v3/

Subscription Purchases

EndpointMethodPathDescription
purchases.subscriptionsv2.getGETapplications/{packageName}/purchases/subscriptionsv2/tokens/{token}Get the current state of a subscription. This is the source of truth.
purchases.subscriptionsv2.revokePOSTapplications/{packageName}/purchases/subscriptionsv2/tokens/{token}:revokeRevoke a subscription immediately. User loses access right away.
purchases.subscriptionsv2.deferPOSTapplications/{packageName}/purchases/subscriptionsv2/tokens/{token}:deferDefer the next billing date (min 1 day, max 1 year extension).
purchases.subscriptionsv2.cancelPOSTapplications/{packageName}/purchases/subscriptionsv2/tokens/{token}:cancelCancel a subscription. User retains access until expiryTime.
purchases.subscriptions.acknowledgePOSTapplications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}:acknowledgeAcknowledge a subscription purchase.
purchases.subscriptions.cancel / purchases.subscriptions.deferPOSTv1 paths with {subscriptionId}Deprecated. Use the subscriptionsv2 methods above. (purchases.subscriptions.get has been removed.)

Request bodies: cancel {"cancellationContext": {"cancellationType": "USER_REQUESTED_STOP_RENEWALS" | "DEVELOPER_REQUESTED_STOP_PAYMENTS"}}; defer {"deferralContext": {"etag": "<etag from subscriptionsv2.get>", "deferDuration": "604800s", "validateOnly": false}} (response itemExpiryTimeDetails[]); revoke {"revocationContext": {"fullRefund": {}}} or proratedRefund: {} or itemBasedRefund: {"productId": "..."}.

SubscriptionPurchaseV2 Response (Key Fields)
FieldTypeDescription
kindstringAlways "androidpublisher#subscriptionPurchaseV2"
subscriptionStatestring (enum)SUBSCRIPTION_STATE_PENDING, SUBSCRIPTION_STATE_ACTIVE, SUBSCRIPTION_STATE_PAUSED, SUBSCRIPTION_STATE_IN_GRACE_PERIOD, SUBSCRIPTION_STATE_ON_HOLD, SUBSCRIPTION_STATE_CANCELED, SUBSCRIPTION_STATE_EXPIRED, SUBSCRIPTION_STATE_PENDING_PURCHASE_CANCELED
lineItems[]arrayOne entry per base plan/offer in the subscription
lineItems[].productIdstringThe subscription product ID
lineItems[].expiryTimetimestampWhen this line item expires
lineItems[].autoRenewingPlanobjectPresent for auto renewing plans. Contains autoRenewEnabled.
lineItems[].prepaidPlanobjectPresent for prepaid plans. Contains allowExtendAfterTime.
lineItems[].offerDetailsobjectOffer applied to this line item. Contains offerTags[], basePlanId.
linkedPurchaseTokenstringIf this purchase replaces another, the token of the replaced purchase.
startTimetimestampWhen the subscription was first purchased.
regionCodestringISO 3166-1 alpha-2 country code of the user.
canceledStateContextobjectWhy the subscription was canceled. Contains one of userInitiatedCancellation, systemInitiatedCancellation, developerInitiatedCancellation, or replacementCancellation. Present for CANCELED and EXPIRED states.
acknowledgementStatestringACKNOWLEDGEMENT_STATE_PENDING or ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED
externalAccountIdentifiersobjectContains obfuscatedExternalAccountId and obfuscatedExternalProfileId.
pausedStateContextobjectPresent when paused. Contains autoResumeTime.

One Time Product Purchases

EndpointMethodPathDescription
purchases.products.getGETapplications/{packageName}/purchases/products/{productId}/tokens/{token}Get the state of a one time product purchase.
purchases.productsv2.getproductpurchasev2GETapplications/{packageName}/purchases/productsv2/tokens/{token}Get one time product purchase using v2 API (no productId required).
purchases.products.acknowledgePOSTapplications/{packageName}/purchases/products/{productId}/tokens/{token}:acknowledgeAcknowledge a one time product purchase.
purchases.products.consumePOSTapplications/{packageName}/purchases/products/{productId}/tokens/{token}:consumeConsume a one time product (makes it available for repurchase).
ProductPurchase Response (Key Fields)
FieldTypeDescription
kindstringAlways "androidpublisher#productPurchase"
purchaseTimeMillislongTime of purchase in milliseconds since epoch.
purchaseStateinteger0 = Purchased, 1 = Canceled, 2 = Pending
consumptionStateinteger0 = Not consumed, 1 = Consumed
orderIdstringThe order ID for this transaction.
acknowledgementStateinteger0 = Not acknowledged, 1 = Acknowledged
purchaseTokenstringThe purchase token.
productIdstringThe product ID.
quantityintegerQuantity purchased (for multi quantity purchases).
obfuscatedExternalAccountIdstringObfuscated account ID set during purchase.
obfuscatedExternalProfileIdstringObfuscated profile ID set during purchase.
regionCodestringISO 3166-1 alpha-2 country code.

Orders

EndpointMethodPathDescription
orders.getGETapplications/{packageName}/orders/{orderId}Get order details for a single order.
orders.batchgetGETapplications/{packageName}/orders:batchGetGet order details for a list of orders.
orders.refundPOSTapplications/{packageName}/orders/{orderId}:refundRefund an order. Add ?revoke=true to also end access (and future renewals). Orders older than 3 years cannot be refunded.
orders.reviewrefundPOSTapplications/{packageName}/orders/{orderId}:reviewrefundAnswer a pendingRefundReviewNotification (chargeback) within 24 hours. Body: pendingRefundToken, refundPreference (APPROVE / DECLINE / NEUTRAL), sampleContentProvided.

Voided Purchases

EndpointMethodPathDescription
purchases.voidedpurchases.listGETapplications/{packageName}/purchases/voidedpurchasesList voided (refunded/revoked) purchases. Supports pagination and filtering by time.
Query Parameters for Voided Purchases
ParameterTypeDescription
startTimelongMilliseconds since epoch. Only return purchases voided after this time. Cannot be older than 30 days (default: now minus 30 days); ignored when token is set.
endTimelongMilliseconds since epoch. Only return purchases voided before this time.
startIndexintegerPagination offset. Only when indexed paging is enabled; prefer token.
tokenstringContinuation token from tokenPagination.nextPageToken of the previous page.
maxResultsintegerMaximum results per page (default 1000, max 1000).
typeinteger0 = voided one time purchases only (default), 1 = one time purchases and subscriptions. With 1, key records by orderId because subscription renewals share a purchase token.
includeQuantityBasedPartialRefundbooleanInclude partial quantity based refunds.

Catalog Management: Subscriptions

EndpointMethodPathDescription
monetization.subscriptions.createPOSTapplications/{packageName}/subscriptionsCreate a new subscription.
monetization.subscriptions.getGETapplications/{packageName}/subscriptions/{productId}Get subscription details.
monetization.subscriptions.listGETapplications/{packageName}/subscriptionsList all subscriptions.
monetization.subscriptions.patchPATCHapplications/{packageName}/subscriptions/{productId}Update subscription fields.
monetization.subscriptions.deleteDELETEapplications/{packageName}/subscriptions/{productId}Delete a draft subscription.
monetization.subscriptions.batchGetGETapplications/{packageName}/subscriptions:batchGetGet multiple subscriptions (up to 100).
monetization.subscriptions.batchUpdatePOSTapplications/{packageName}/subscriptions:batchUpdateUpdate multiple subscriptions (up to 100).

Catalog Management: Base Plans

EndpointMethodPathDescription
monetization.subscriptions.basePlans.activatePOST...basePlans/{basePlanId}:activateActivate a base plan.
monetization.subscriptions.basePlans.deactivatePOST...basePlans/{basePlanId}:deactivateDeactivate a base plan.
monetization.subscriptions.basePlans.deleteDELETE...basePlans/{basePlanId}Delete a base plan.
monetization.subscriptions.basePlans.migratePricesPOST...basePlans/{basePlanId}:migratePricesEnd a legacy price cohort by migrating subscribers to the current price.
monetization.subscriptions.basePlans.batchMigratePricesPOST...basePlans:batchMigratePricesBatch price migration.
monetization.subscriptions.basePlans.batchUpdateStatesPOST...basePlans:batchUpdateStatesBatch activate/deactivate.

Catalog Management: Offers

EndpointMethodPathDescription
monetization.subscriptions.basePlans.offers.createPOST...offersCreate an offer.
monetization.subscriptions.basePlans.offers.getGET...offers/{offerId}Get offer details.
monetization.subscriptions.basePlans.offers.listGET...offersList offers for a base plan.
monetization.subscriptions.basePlans.offers.patchPATCH...offers/{offerId}Update an offer.
monetization.subscriptions.basePlans.offers.deleteDELETE...offers/{offerId}Delete a draft offer.
monetization.subscriptions.basePlans.offers.activatePOST...offers/{offerId}:activateActivate an offer.
monetization.subscriptions.basePlans.offers.deactivatePOST...offers/{offerId}:deactivateDeactivate an offer.
monetization.subscriptions.basePlans.offers.batchGetPOST...offers:batchGetGet multiple offers.
monetization.subscriptions.basePlans.offers.batchUpdatePOST...offers:batchUpdateUpdate multiple offers.
monetization.subscriptions.basePlans.offers.batchUpdateStatesPOST...offers:batchUpdateStatesBatch activate/deactivate offers.

Catalog Management: One Time Products (monetization.onetimeproducts)

The default surface for one time products: covers products created here and catalogs migrated from inappproducts. Once a product is migrated, it can no longer be reached through inappproducts.

EndpointMethodPathDescription
monetization.onetimeproducts.getGETapplications/{packageName}/oneTimeProducts/{productId}Get product details.
monetization.onetimeproducts.listGETapplications/{packageName}/oneTimeProductsList all one time products.
monetization.onetimeproducts.patchPATCHapplications/{packageName}/onetimeproducts/{productId}Create (with allowMissing=true) or update a product. Requires updateMask and regionsVersion.version; there is no create method.
monetization.onetimeproducts.batchGetGETapplications/{packageName}/oneTimeProducts:batchGetGet multiple products.
monetization.onetimeproducts.batchUpdatePOSTapplications/{packageName}/oneTimeProducts:batchUpdateCreate or update up to 100 products.
monetization.onetimeproducts.deleteDELETEapplications/{packageName}/oneTimeProducts/{productId}Delete a product.
monetization.onetimeproducts.batchDeletePOSTapplications/{packageName}/oneTimeProducts:batchDeleteDelete multiple products.
monetization.onetimeproducts.purchaseOptions.batchUpdateStatesPOSTapplications/{packageName}/oneTimeProducts/{productId}/purchaseOptions:batchUpdateStatesActivate or deactivate purchase options. A new purchase option starts Draft and is invisible to the Play Billing Library until activated.
monetization.onetimeproducts.purchaseOptions.offers.activate / .deactivate / .cancelPOST.../purchaseOptions/{purchaseOptionId}/offers/{offerId}:activate (or :deactivate, :cancel)Change the state of one offer.
monetization.onetimeproducts.purchaseOptions.offers.batchUpdate / .batchUpdateStates / .listPOST / POST / GET.../purchaseOptions/{purchaseOptionId}/offers:batchUpdate (or :batchUpdateStates, or no suffix for list)Bulk update, bulk activate or deactivate, or list offers under one purchase option.

Legacy One Time Products (inappproducts)

Only for one time products never migrated off the inappproducts service. See Catalog Management: One Time Products (monetization.onetimeproducts) above for everything else.

EndpointMethodPathDescription
inappproducts.insertPOSTapplications/{packageName}/inappproductsCreate a one time product.
inappproducts.getGETapplications/{packageName}/inappproducts/{sku}Get product details.
inappproducts.listGETapplications/{packageName}/inappproductsList all one time products.
inappproducts.patchPATCHapplications/{packageName}/inappproducts/{sku}Update product fields.
inappproducts.updatePUTapplications/{packageName}/inappproducts/{sku}Replace product entirely.
inappproducts.deleteDELETEapplications/{packageName}/inappproducts/{sku}Delete a product.
inappproducts.batchGetGETapplications/{packageName}/inappproducts:batchGetGet multiple products (up to 100).
inappproducts.batchUpdatePOSTapplications/{packageName}/inappproducts:batchUpdateUpdate multiple products (up to 100).
inappproducts.batchDeletePOSTapplications/{packageName}/inappproducts:batchDeleteDelete multiple products.

Rate Limiting

Quota bucketAPIs in the bucketDefault quota
SubscriptionsSubscriptionPurchases and SubscriptionPurchasesV2 calls not listed under Subscription Updates (for example purchases.subscriptionsv2.get, purchases.subscriptions.acknowledge)3,000 queries per minute, independent per bucket
Subscription Updatespurchases.subscriptionsv2.revoke and the deprecated v1 purchases.subscriptions.cancel / .defer (Google's quota page does not yet list subscriptionsv2.cancel or .defer)3,000 queries per minute, independent per bucket
One-time Purchasespurchases.products.*, purchases.productsv2.*3,000 queries per minute, independent per bucket
Ordersorders.*, purchases.voidedpurchases.list3,000 queries per minute, independent per bucket
ExternalTransactionsexternaltransactions.*3,000 queries per minute for the bucket; createexternaltransaction and refundexternaltransaction also share a 1,200 queries per minute limit (get calls do not count)
Publishing, Monetization, and Reply to ReviewsPublishing APIs, monetization.*, Permissions APIs, Reply to Reviews APIs3,000 queries per minute, independent per bucket

There are no Read, Write, or Sensitive query tiers; catalog writes are additionally limited per app per hour by latencyTolerance (see catalog-management). Quota is measured per project, per minute, per bucket, and each bucket's quota is independent of the others. When you exceed a bucket's quota, the API returns HTTP 429 (Too Many Requests). Implement exponential backoff for quota errors. You can monitor usage in Google Cloud Console > IAM & Admin > Quotas (service androidpublisher.googleapis.com).

Phase 3: Auth and Scopes

Every call to androidpublisher.googleapis.com uses OAuth 2.0. The only scope you need for billing operations is:

text
https://www.googleapis.com/auth/androidpublisher

Guidance for a server side integration:

  1. Create a service account in a Google Cloud project that has the Google Play Android Developer API enabled.
  2. Grant the service account access in Play Console under Users and permissions. Assign only the permissions you need. For subscription reads assign "View financial data, orders, and cancellation survey responses". For purchase mutations (refund, cancel, revoke, defer) assign "Manage orders and subscriptions". For catalog calls (monetization.*, inappproducts.*) assign "Manage store presence".
  3. Mint a short lived access token from the service account JSON key using your platform's Google auth client. Cache the token until a minute before expiry.
  4. Send Authorization: Bearer <token> on every request. Set Content-Type: application/json for POST, PATCH, and PUT bodies.
  5. Use exponential backoff for HTTP 429 and 5xx responses. Treat 401 as "refresh token" and 403 as "fix permissions", not as retry candidates.

Typical request shape for a subscription state lookup:

http
GET /androidpublisher/v3/applications/com.example.app/purchases/subscriptionsv2/tokens/abc123 HTTP/1.1
Host: androidpublisher.googleapis.com
Authorization: Bearer ya29.a0Af...
Accept: application/json

Typical request shape for a cancel call:

http
POST /androidpublisher/v3/applications/com.example.app/purchases/subscriptionsv2/tokens/abc123:cancel HTTP/1.1
Host: androidpublisher.googleapis.com
Authorization: Bearer ya29.a0Af...
Content-Type: application/json

{"cancellationContext": {"cancellationType": "USER_REQUESTED_STOP_RENEWALS"}}

Typical request shape for a voided purchases page:

http
GET /androidpublisher/v3/applications/com.example.app/purchases/voidedpurchases?maxResults=1000&type=1 HTTP/1.1
Host: androidpublisher.googleapis.com
Authorization: Bearer ya29.a0Af...

References

Perguntas frequentes

O que a habilidade de IA Play Developer Api Reference faz?

Use this skill as a quick reference for billing related Google Play Developer API REST endpoints, covering purchases.products, purchases.subscriptionsv2, purchases.voidedpurchases, and monetization endpoints. Lists paths, auth scopes, and typical request shapes.

Por que usar Play Developer Api Reference no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Play Developer Api Reference é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Play Developer Api Reference no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/play-developer-api-reference. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Play Developer Api Reference?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Play Developer Api Reference?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Play Developer Api Reference com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Play Developer Api Reference é gratuita?

Sim. A habilidade é publicada no GitHub por RevenueCat sob a licença Apache-2.0. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇