Play Developer Api Referenceのロゴ

Play Developer Api Reference

組織
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.

概要

公開者RevenueCat
リポジトリplay-billing-skills
スキル名play-developer-api-reference
スター
58
フォーク
0
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    RevenueCatがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルPlay Developer Api ReferenceをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/play-developer-api-reference
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでPlay Developer Api Referenceを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にPlay Developer Api Referenceを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Play Developer Api Referenceは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

よくある質問

AIスキル「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.

TypingMindでPlay Developer Api Referenceを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Play Developer Api Referenceはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにPlay Developer Api Referenceをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/play-developer-api-referenceを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Play Developer Api Referenceを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Play Developer Api Referenceは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもPlay Developer Api Referenceを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Play Developer Api Reference」は無料ですか?

はい。RevenueCatがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇