revenuecat/ai-toolkit

rc-revenuecat-vs-raw-billing

Use this skill to decide whether to use RevenueCat or raw Google Play Billing on Android.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/revenuecat/ai-toolkit --skill rc-revenuecat-vs-raw-billing

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

RevenueCat vs Raw Google Play Billing

Phase 0: Intent

Use this skill when you are choosing between integrating RevenueCat or wiring Google Play Billing Library (PBL) directly, and you need to see which concerns disappear, which shift, and which still land on your team. The decision covers both the Android client and any server side infrastructure that supports subscriptions or one time purchases.

Typical questions this skill answers:

  • If I adopt RevenueCat, what client code no longer exists in my app?
  • What backend pieces (receipt verification, RTDN, state machine) does RevenueCat replace?
  • What do I still own regardless of which path I pick?
  • Is there a concern where raw PBL is the only option today?

Phase 1: Locate the Concern

Before reading the tables, identify what you are actually evaluating. Sort your requirement into one of these buckets and jump to the matching section:

BucketExamplesGo to
Client purchase plumbingBillingClient, listeners, acknowledgement, consumptionClient side table
Server purchase truthToken validation, RTDN, entitlement state machineServer side table
Out of scope for eitherAuth, your user DB, paywall UI, pushYour responsibility table

If the concern is split (for example, RevenueCat verifies the token but you still need to gate premium content on your API), you own the integration glue even though the verification itself is handled.

Phase 2: Side by Side Reference

Client side

ConcernRaw PBLRevenueCat
BillingClient setup and configurationYou writeHandled internally
Connection lifecycle and reconnectionYou write startConnection(); reconnection is one builder flag since PBL 8 (enableAutoServiceReconnection())Handled internally
PurchasesUpdatedListenerYou writeReplaced by purchase callbacks
queryProductDetailsAsync()You writeReplaced by awaitOfferings() / awaitGetProducts()
launchBillingFlow()You writeCalled internally by awaitPurchase()
Acknowledgement after purchaseYou writeHandled automatically
Consumption of consumablesYou writeHandled automatically (one time products are consumed unless marked non consumable in the dashboard)
queryPurchasesAsync() on launchYou writeHandled internally on connection
Retry logic for transient errorsYou writeHandled internally by SDK
BillingResponseCode handlingYou writeAbstracted to PurchasesErrorCode
In-app payment recovery messagesYou writeAutomatic (showInAppMessagesAutomatically = true)
Subscription option selection for offersYou writedefaultOption selected automatically

Server side

ConcernRaw PBLRevenueCat
Google Play Developer API integrationYou buildRevenueCat backend
Service account credential managementYou manageConfigured once in RC dashboard
Receipt verification on every purchaseYou buildAutomatic
Purchase token validation and deduplicationYou buildRevenueCat backend
linkedPurchaseToken chain traversalYou buildRevenueCat backend
RTDN processing and dispatchYou buildRevenueCat processes, sends webhooks
Cloud Pub/Sub setupYou set up topic, subscription, and push endpointEnable Pub/Sub once; RevenueCat creates the topic and you paste it into Play Console (strongly recommended; needed for DEFERRED plan changes and one time refunds)
Subscription state machine on backendYou buildCustomerInfo computed by RC
Entitlement computation across 8 statesYou buildisActive computed by RC
Grace period / account hold trackingYou buildbillingIssueDetectedAt
Cancellation with access-until-expiry logicYou buildisActive + unsubscribeDetectedAt
Subscription deferralDirect Google Play Developer API call (your backend)REST API POST /v1/subscribers/{app_user_id}/subscriptions/{product_identifier}/defer
Subscription revocation and refundDirect Google Play Developer API call (your backend)REST API .../subscriptions/{product_identifier}/revoke or .../transactions/{store_transaction_identifier}/refund
Price cohort trackingYou buildNot tracked per subscriber on Google Play (RC assumes renewal at the purchase price); manage legacy cohorts in Play Console
Product-to-entitlement mappingYou buildConfigured in RC dashboard

What remains your responsibility either way

ConcernNotes
User authentication systemYou bring your own; pass user ID to RC
Your own database of usersRC is not your primary user database
Premium content server sideVerify via RC REST API or webhooks
Webhook receiver endpointYou build; RC sends, you receive
Play Console product creationStill done in Play Console
Alternative billing programsNot supported by the RevenueCat SDK (11.1.0); integrate the Play Billing Library directly
App UI (paywalls, onboarding)You build (RC Paywalls UI optional)
Push notifications for payment issuesYou build on top of webhook events

Phase 3: Recommendation Heuristic

Use these rules to convert the tables into a decision:

  1. If your app needs an alternative billing program that RevenueCat does not cover, plan to keep a raw PBL path for it.
  2. If you would otherwise build a receipt verification service, an RTDN pipeline, and a subscription state machine from scratch, the server side table lists at least eight concerns that RevenueCat removes. Choose RevenueCat unless you have a concrete reason to own that stack.
  3. If you already have a mature billing backend with verified tokens and tested state handling, the gain is smaller. Weigh it against RevenueCat's client side simplifications and dashboard driven catalog.
  4. Always confirm the "remains your responsibility" row items are staffed. RevenueCat does not replace your auth, your user database, your paywall UI, or your premium content gate. Passing appUserID and verifying entitlements server side via the REST API or webhooks is still on you.
  5. When in doubt, map every requirement to a row in one of the three tables. Anything that lands in the "remains your responsibility" table costs the same under either option and should not drive the decision.

Quick gate:

text
need custom RTDN pipeline?      -> raw PBL only if you must own it end to end
need deferral or revocation?    -> RevenueCat REST API v1 defer/revoke endpoints
need fast time to production?   -> RevenueCat, then add raw PBL escape hatches later

References

来自同一仓库

更多 Skills

全部 Skills
revenuecat
社区

create-revenuecat-project

Set up a complete RevenueCat project from scratch — creates apps, products, entitlements, offerings, and packages in the correct order. Use when the user wants to create a new RevenueCat project, configure in-app purchases, set up subscriptions or monetization, or bootstrap IAP infrastructure for iOS, Android, or Web.

1小时安装量
2
GitHub Stars
79
最近更新
11月17日
revenuecat
社区

rc-cancellations-pauses-winback

Use this skill when surfacing cancellation, pause, and winback state on Android with RevenueCat. Covers reading unsubscribeDetectedAt, billingIssueDetectedAt, pause state and resume date via SubscriptionInfo.autoResumeDate, showManageSubscriptions for the deep link, and the SUBSCRIPTIONPAUSED webhook.

1小时安装量
2
GitHub Stars
79
最近更新
11月17日
revenuecat
社区

rc-configuring-the-sdk

Use this skill when adding and configuring the RevenueCat Android SDK (purchases-android, artifact com.revenuecat.purchases:purchases) in an app. Covers the Gradle dependency, Purchases.configure with PurchasesConfiguration, initial app user id strategy, and log level.

1小时安装量
2
GitHub Stars
79
最近更新
11月17日
revenuecat
社区

rc-plan-changes

Use this skill when implementing subscription upgrades, downgrades, and plan switches via RevenueCat on Android. Covers StoreReplacementMode, picking a replacement mode, and letting the SDK manage linkedPurchaseToken chaining.

1小时安装量
2
GitHub Stars
79
最近更新
11月17日