Logo: Understanding Billing

Understanding Billing

Organisatioun
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.

Add to TypingMind

Iwwersiicht

EditeurRevenueCat
Repositoryplay-billing-skills
Skill-Nummunderstanding-billing
Stären
58
Forks
0
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    RevenueCat huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Understanding Billing an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/understanding-billing
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Understanding Billing an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Understanding Billing automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Understanding Billing net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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

Heefeg gestallte Froen

Wat mécht de KI-Skill 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.

Firwat Understanding Billing op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Understanding Billing besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Understanding Billing an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/understanding-billing an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Understanding Billing benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Understanding Billing benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Understanding Billing domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Understanding Billing gratis?

Jo. RevenueCat huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇