Logo vun Subscriptions

Subscriptions

Organisatioun
RevenueCat
subscriptions

Use this skill when modeling Google Play subscriptions (the three tier Subscription, Base Plan, Offer hierarchy), choosing a catalog shape, and deciding how to map your paywall to base plans and offers. Grounded in Play Billing Library 9.x.

Iwwersiicht

EditeurRevenueCat
Repositoryplay-billing-skills
Skill-Nummsubscriptions
Stären
58
Forks
0
Matgeliwwert Fichieren
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

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

Installatioun

Installéiert de KI-Skill Subscriptions an TypingMind, fir e mat all LLM ze benotzen, oder füügt 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 „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/RevenueCat/play-billing-skills/tree/main/google-play/subscriptions
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu 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 de 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/subscriptions .claude/skills/subscriptions
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Subscriptions 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 Subscriptions automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Subscriptions 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-Keys.

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

Subscriptions

Google Play models every subscription as three nested objects: Subscription, Base Plan, and Offer. The catalog you build in the Play Console must match the catalog your app queries and the paywall your users see. This skill guides you through the hierarchy, helps you pick a catalog shape, and shows how to query and launch the right offer with Play Billing Library 9.x.

Phase 0: Intent

Confirm the goal before you touch the Play Console or write code. Answer these questions first.

QuestionWhy it matters
What product are you selling?One Subscription per logical entitlement (Premium, Cloud Storage, etc).
How many billing periods?Each billing period becomes a separate Base Plan under that Subscription.
Do you need trials, intro pricing, upgrade incentives, or win back?Offers attach to Base Plans. Prepaid Base Plans cannot carry Offers.
Who decides who qualifies for an offer?Google evaluates New customer acquisition and Upgrade eligibility; developer determined covers everything else (loyalty, win back, cohorts).
Do you have add ons?Each add on is its own Subscription product. Play can sell them together as one subscription with add ons purchase (several ProductDetailsParams, first = base item); all items must be auto renewing with the same billing period, max 50 items, not available in KR. Which add on needs which base is your app's rule; Play does not enforce it.

Stop here if the answer to "what are we actually selling" is not yes or no clear. Modeling a fuzzy catalog locks you into Product IDs that you cannot rename later.

Phase 1: Discovery

Inspect the current state before you design the catalog.

  1. List every entitlement your app grants. Each entitlement typically maps to one Subscription.
  2. List every price point you want to charge (monthly, yearly, prepaid 30 day, installment 12 month, etc). Each price point maps to a Base Plan.
  3. List every promotion you want to run (free trial, intro price, loyalty discount, win back, upgrade incentive). Each promotion maps to an Offer on a specific Base Plan.
  4. Pull the existing catalog from the Play Console under Monetize, Products, Subscriptions. Note any Product IDs already in use. Product IDs are permanent and cannot be reused.
  5. Check which markets you ship to. Installment plans are only available in Brazil, France, Italy, and Spain. Prepaid plans are often expected in markets with low credit card penetration.

Flag any mismatch between what the app currently queries and what the Play Console contains. A common source of bugs is a Base Plan or Offer that exists in code but was never activated in the console.

Phase 2: Plan

Decide the catalog shape. These are the decisions you must make before creating anything in the Play Console.

How many Subscriptions

One Subscription per distinct entitlement. If Premium and Cloud Storage unlock different features, they are two Subscriptions. If Premium Monthly and Premium Yearly unlock the same features, they are one Subscription with two Base Plans.

How many Base Plans per Subscription

Add one Base Plan per billing period or plan type you want to sell under that Subscription.

Plan typeUse whenOffers allowed
Auto renewingStandard recurring subscription. Google charges at each period end until cancellation.Yes
PrepaidUser pays upfront for a fixed window. No auto renew, no grace period, no account hold.No
InstallmentUser commits to N monthly payments, then renews either month to month or into another N payment commitment (renewal type is fixed at creation). Brazil, France, Italy, Spain only.Yes

A Subscription with a monthly auto renewing plan and a yearly auto renewing plan is the typical paywall shape. Add a prepaid plan if your market needs it. Add an installment plan only if you ship to a supported market.

How to model trials and intro offers

Offers attach to a single Base Plan. Each Offer has an ordered list of pricing phases. You can stack up to two pricing phases before the full Base Plan price takes over.

PatternPhase 1Phase 2Eligibility
Free trialFree for N days(skip)New customer acquisition (Google managed)
Intro priceDiscounted for N periods(skip)New customer acquisition or developer determined
Trial then introFree for N daysDiscounted for N periodsNew customer acquisition
Loyalty discountDiscounted for N periods(skip)Developer determined (tagged)
Win backDiscounted for N periods(skip)Developer determined (tagged, for example winback)
Upgrade incentiveDiscounted for N periods(skip)Upgrade (Google managed, user currently holds a specified subscription)

Pick Google managed eligibility for new customer trials. Pick developer determined eligibility when your backend decides (loyalty, cohorts, cross product, custom win back logic). Tag developer determined offers so your app can filter on offerTags.

Decision checklist

Before leaving this phase you should be able to fill in this table for every product.

Subscription Product IDBase Plan IDPlan typeOffer IDEligibilityPricing phases
premiummonthlyauto renewingfree-trialNew customer7 days free
premiummonthlyauto renewingintro-3moNew customer2.99 for 3 months
premiumyearlyauto renewing(none)n/afull price
premiumprepaid-monthlyprepaid(none)n/afull price

If a row is unclear, go back to Phase 1 and clarify before creating the product.

Phase 3: Execute

Play Console setup (mirror of your Phase 2 plan)

  1. Go to Monetize, Products, Subscriptions. Click Create subscription.
  2. Enter the Product ID from your plan. It is permanent. Enter Name, Description, and benefits.
  3. Save the Subscription. It is an empty container until you add Base Plans.
  4. For each Base Plan row in your table, click Add base plan. Enter the Base Plan ID, pick the plan type, pick the billing period, set the default price. For installment plans, set the commitment count. Activate the Base Plan.
  5. For each Offer row, open the parent Base Plan, click Add offer, enter the Offer ID, set the eligibility, add the pricing phases in order, activate the Offer.
  6. Activate the Subscription itself once at least one Base Plan is active. Allow a few minutes for propagation.

Code that queries the hierarchy

Query product details once per Subscription you want to show.

kotlin
val params = QueryProductDetailsParams.newBuilder()
    .setProductList(
        listOf(
            QueryProductDetailsParams.Product.newBuilder()
                .setProductId("premium")
                .setProductType(ProductType.SUBS)
                .build()
        )
    )
    .build()

val result = billingClient.queryProductDetails(params)
val details = result.productDetailsList?.firstOrNull()

Read the offer list. Every Base Plan without an Offer still produces one SubscriptionOfferDetails entry (the full price entry).

kotlin
val offerDetails = details
    ?.subscriptionOfferDetails
    ?: emptyList()

offerDetails.forEach { offer ->
    val basePlanId = offer.basePlanId
    val offerId = offer.offerId
    val tags = offer.offerTags
    val phases = offer.pricingPhases.pricingPhaseList
}

Filter by developer determined eligibility tags returned from your backend.

kotlin
val eligible = offerDetails.filter { offer ->
    val tags = offer.offerTags
    tags.isEmpty() || tags.any { it in userEligibleTags }
}

Detect a prepaid plan by checking that every pricing phase is non recurring.

kotlin
val isPrepaid = offer.pricingPhases.pricingPhaseList
    .all { it.recurrenceMode == RecurrenceMode.NON_RECURRING }

Detect an installment plan by reading installmentPlanDetails.

kotlin
val installment = offer.installmentPlanDetails
val commitmentCount = installment?.installmentPlanCommitmentPaymentsCount
val renewalCount = installment?.subsequentInstallmentPlanCommitmentPaymentsCount

Launch the billing flow with the selected offer token. Every purchase requires a token, including Base Plans without Offers.

kotlin
val productParams = BillingFlowParams.ProductDetailsParams.newBuilder()
    .setProductDetails(details)
    .setOfferToken(chosenOffer.offerToken)
    .build()

val flowParams = BillingFlowParams.newBuilder()
    .setProductDetailsParamsList(listOf(productParams))
    .build()

billingClient.launchBillingFlow(activity, flowParams)

Phase 4: Verify

Prove the catalog and the code agree before you ship.

  1. Confirm every Product ID, Base Plan ID, and Offer ID in your Phase 2 table exists and is active in the Play Console.
  2. Run queryProductDetails on a signed build and log every SubscriptionOfferDetails entry. Check that basePlanId and offerId values match your table.
  3. For each Offer, confirm the pricing phases in the response match what you configured. A missing phase usually means the Offer is not active.
  4. Walk through every paywall path and confirm your code passes a non null offerToken. Missing tokens cause the billing flow to fail.
  5. Test developer determined eligibility by returning an empty tag set from your backend and confirming tagged Offers drop out of the UI.
  6. Test a prepaid purchase end to end if you sell one. Confirm your app extends entitlement on top up rather than treating the second purchase as a new subscription: the top up is a new token that you process and acknowledge, then invalidate the linked token.
  7. Confirm every purchase, including each prepaid top up (it arrives as a new purchase token with the previous token in linkedPurchaseToken), is acknowledged within 3 days, or within half the plan duration for prepaid plans shorter than one week (1.5 days for a 3 day plan). An unacknowledged top up revokes and refunds the remaining subscription. Server side acknowledgement after RTDN processing is the safer default.
  8. If you sell installment plans in Brazil, France, Italy, or Spain, test the purchase dialog in that locale and confirm the commitment count is communicated to the user.

References

  • Full chapter

  • Play Billing Library 9.x ProductDetails, SubscriptionOfferDetails, BillingFlowParams.ProductDetailsParams.

  • Play Console: Monetize, Products, Subscriptions.

Heefeg gestallte Froen

Wat mécht de KI-Skill Subscriptions?

Use this skill when modeling Google Play subscriptions (the three tier Subscription, Base Plan, Offer hierarchy), choosing a catalog shape, and deciding how to map your paywall to base plans and offers. Grounded in Play Billing Library 9.x.

Firwat Subscriptions op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Subscriptions 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 vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Subscriptions 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/subscriptions 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 Subscriptions 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 Subscriptions benotzen?

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

Ass de KI-Skill Subscriptions gratis?

Jo. De Skill gëtt vum RevenueCat ë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 weiderverwendbaart Pak vun Instruktiounen, dat 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 en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

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