Understanding Billing logo

Understanding Billing

Organization
RevenueCat
understanding-billing

Use this skill when a developer is new to Google Play Billing or needs to orient themselves before picking an implementation task. Maps their goal to the right pillar (Play Billing Library, Google Play Developer API, Play Console plus RTDNs) and routes them to the concrete skill to invoke next.

Overview

PublisherRevenueCat
Repositoryplay-billing-skills
Skill nameunderstanding-billing
Stars
58
Forks
0
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by RevenueCat on GitHub. Read the source before you install it.

Installation

Install the Understanding Billing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/understanding-billing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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/understanding-billing .claude/skills/understanding-billing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Understanding Billing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Understanding Billing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Understanding Billing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Phase 0: Intent

Tell the user: "I will orient you to Google Play Billing's three pillars, map your goal to the right pillar, and point you at the concrete skill to run next."

Phase 1: Discovery

Before touching code, confirm the developer understands the three pillars and the four actors. Each pillar owns a different slice of the system:

PillarSurfaceRole
Play Billing Library (PBL)Android client, Gradle dep com.android.billingclient:billing-ktxQuery products, launch purchase dialog, receive results on device
Google Play Developer APIServer REST API at androidpublisher.googleapis.comVerify purchases, manage subscriptions, manage catalog. Source of truth
Google Play ConsoleWeb dashboardCreate products, set prices, configure RTDNs and API access

A fourth piece, Cloud Pub/Sub, carries Real Time Developer Notifications (RTDNs) from Google to your backend when purchase or subscription state changes.

The four actors in every transaction:

ActorResponsibility
Your appQuery products, launch purchase flow, forward purchase tokens to backend
Google Play Store appHosts the billing service PBL connects to, renders the purchase dialog, and talks to Google's servers
Your backendVerify tokens against the Developer API, store entitlements, process RTDNs
Google Play serversProcess payments, run renewals and payment recovery, emit RTDNs

Ask the developer which of these surfaces they already have set up: Play Console account, service account credentials, Pub/Sub topic, backend, Android app.

Phase 2: Plan

Map the developer's goal to the pillar(s) they need, then to the next skill.

Developer goalPrimary pillarNext skill
First time onboarding, no account yetPlay Consolegoogle-play/setup
Show prices and launch a purchase from the appPBLgoogle-play/integrating-pbl
Verify a purchase token on the serverDeveloper APIgoogle-play/backend-architecture
Receive renewal and cancellation eventsRTDN plus Developer APIgoogle-play/rtdn
Create or edit products, base plans, offersPlay Console or catalog APIgoogle-play/catalog-management
Handle subscription lifecycle statesDeveloper API plus RTDNgoogle-play/subscription-states
Upgrade an existing PBL 7 or 8 integrationPBLgoogle-play/pbl-v7-to-v9-migration or google-play/pbl-v8-to-v9-migration
Offer alternative billing or external linksPBL plus Developer APIgoogle-play/alternative-billing

Decision notes and tradeoffs:

  • Treat the Developer API as the source of truth. PBL is convenience. Your backend should verify every purchase token before granting entitlements.
  • Acknowledge every purchase within 3 days. Unacknowledged purchases auto refund.
  • PBL feature availability depends on the Google Play Store app version on the device. Use isFeatureSupported() before calling feature specific APIs.
  • Subscriptions have a lifecycle (active, paused, grace period, on hold, canceled, expired). Plan for state handling on the server side, not just the app.
  • Entitlements are your problem. Google does not store what each user has access to.

Phase 3: Execute

This chapter is conceptual. There is no code to run here. Route the developer to the implementation skill that matches the goal you identified in Phase 2.

Core vocabulary the next skill will assume you know:

TermMeaning
Product ID (SKU)Unique string per product, for example premium_monthly. Cannot be reused after deletion
Purchase TokenGoogle generated string identifying a transaction. Primary key for server verification
Order IDFinancial transaction ID. Subscriptions append a sequence like GPA.1234-5678-9012..1 per renewal
EntitlementThe access you grant after verifying a purchase. You track this, not Google
AcknowledgementRequired confirmation within 3 days or Google refunds the purchase
ConsumptionMarks a consumable one time product as used so it can be bought again. Implicitly acknowledges
Base PlanA billing period plus price inside a subscription product
OfferPromotional phase on a base plan (trial, intro price). Emits an offer token for purchase
RTDNPush notification via Cloud Pub/Sub when purchase or subscription state changes
Linked Purchase TokenPoints a new token back to the prior one on upgrade or downgrade. Follow the chain on the server

Product types the next skill will branch on:

TypeSubtypeNotes
One timeConsumableBuyable repeatedly after consumption. Virtual currency, boosts
One timeNon consumablePermanent. Ad removal, unlocks
Subscriptionauto-renewingStandard recurring. Google charges until canceled
SubscriptionPrepaidFixed period, no auto renewal. User tops up to extend
SubscriptionInstallmentSelect markets (BR, FR, IT, ES). Minimum payment commitment

High level purchase flow the next skill will implement:

  1. App queries product details through PBL.
  2. App shows products with localized prices.
  3. User taps Buy. App calls launchBillingFlow().
  4. Google Play dialog collects payment.
  5. Google processes payment. May enter pending for cash payments.
  6. PBL fires PurchasesUpdatedListener.
  7. App sends purchase token to backend.
  8. Backend calls Developer API to verify.
  9. Backend records entitlement, app unlocks content.
  10. Backend acknowledges within 3 days. For subscriptions, backend processes RTDNs for the rest of the lifecycle.

Phase 4: Verify

Sanity check the developer's understanding before moving on:

  • Can they name the three pillars and what each one owns?
  • Do they know which pillar is the source of truth? (Answer: Google Play Developer API)
  • Do they know the acknowledgement deadline? (Answer: 3 days, else auto refund)
  • Can they state whether their product is one time (consumable vs non consumable) or subscription (auto renewing, prepaid, installment)?
  • Do they know that entitlement tracking is their responsibility, not Google's?
  • Have they picked the next skill to invoke based on the Phase 2 table?

If any answer is unclear, re-read the relevant section of the full chapter before proceeding. If the developer is trying to sell physical goods, services performed in the physical world, peer to peer payments, or content consumable outside the app, Google Play Billing is not required. Alternative billing and external link programs vary by region (South Korea, India, EEA, United States, Japan, United Kingdom, Australia and other user choice billing markets); route to google-play/alternative-billing.

References

Frequently asked questions

What does the Understanding Billing AI skill do?

Use this skill when a developer is new to Google Play Billing or needs to orient themselves before picking an implementation task. Maps their goal to the right pillar (Play Billing Library, Google Play Developer API, Play Console plus RTDNs) and routes them to the concrete skill to invoke next.

Why use Understanding Billing on TypingMind?

Because you install it once and use it with any model. Understanding Billing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Understanding Billing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/understanding-billing. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Understanding Billing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Understanding Billing?

As many as you like. As long as a model supports skills, you can use Understanding Billing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Understanding Billing AI skill free?

Yes. It is published on GitHub by RevenueCat under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇