rc-catalog-management

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Catalog Management

目录管理

Manage the Android product catalog across two surfaces: the Google Play Console (source of truth for products) and the RevenueCat dashboard (entitlements, offerings, targeting). You do not call the Google Play Developer
monetization.subscriptions
or
monetization.onetimeproducts
endpoints from your app or backend.
在两个平台上管理Android产品目录:Google Play Console(产品的可信数据源)和RevenueCat仪表板(entitlements、offerings、定向规则)。请勿从你的应用或后端调用Google Play Developer的
monetization.subscriptions
monetization.onetimeproducts
端点。

Phase 1: Understand

阶段1:认知理解

Read this phase before you touch anything.
在进行任何操作前,请先阅读本阶段内容。

Why two surfaces

为何需要两个平台

SurfaceOwnsExamples
Google Play ConsoleUnderlying products, base plans, offers, prices
premium_monthly
, base plan
p1m
, intro offer
RevenueCat dashboardEntitlements, Offerings, Packages, Targeting
pro
entitlement,
default
offering,
$rc_monthly
package
Play Console holds the billable SKU. RevenueCat decides which SKU gets surfaced to which user and under which entitlement key.
平台负责内容示例
Google Play Console基础产品、基础方案、优惠活动、定价
premium_monthly
、基础方案
p1m
、入门优惠
RevenueCat 仪表板Entitlements、Offerings、Packages、定向规则
pro
entitlement、
default
offering、
$rc_monthly
package
Play Console存储可计费的SKU。RevenueCat决定向哪些用户展示哪些SKU,以及关联到哪个entitlement密钥。

What changes without an app update

无需更新应用即可生效的变更

When your app calls
awaitOfferings()
, it fetches whatever the RevenueCat dashboard has configured. Offering edits, package swaps, and targeting rules propagate on the next app launch. No binary release is required.
当你的应用调用
awaitOfferings()
时,它会获取RevenueCat仪表板上的最新配置。Offering编辑、Package替换和定向规则会在下次应用启动时生效,无需发布新版本。

When to use the REST API

何时使用REST API

If you need to automate catalog edits from a backend (for example, seeding dozens of offerings across environments), use the RevenueCat REST API for products, entitlements, and offerings. You still do not talk to Google directly. Play Console remains the product source of truth.
如果你需要从后端自动化目录编辑(例如,在多个环境中批量创建offerings),请使用RevenueCat REST API来管理产品、entitlements和offerings。你仍然无需直接调用Google的接口。Play Console始终是产品的可信数据源。

Phase 2: Plan

阶段2:规划

Before you make a change, decide:
  1. Is this a new product, or a repackaging of an existing one?
    • New product: start in Play Console.
    • Repackaging (new offering, new targeting, new entitlement mapping): stay in RevenueCat.
  2. Which entitlement does the product unlock? If you do not have a matching entitlement, create one first.
  3. Which offering and package identifier? Decide the package identifier (for example
    $rc_monthly
    ,
    $rc_annual
    ) so your paywall code keeps working.
  4. Does targeting need to change? If different users should see different offerings, plan the placement name and the targeting rule (OS version, country, custom attribute).
在进行变更前,请先确定:
  1. 这是新产品,还是现有产品的重新包装?
    • 新产品:从Play Console开始操作。
    • 重新包装(新offering、新定向规则、新entitlement映射):在RevenueCat内完成。
  2. 该产品将解锁哪个entitlement? 如果没有匹配的entitlement,请先创建一个。
  3. 使用哪个offering和package标识符? 确定package标识符(例如
    $rc_monthly
    $rc_annual
    ),确保你的付费墙代码可以正常工作。
  4. 是否需要修改定向规则? 如果不同用户应看到不同的offerings,请规划展示位置名称和定向规则(操作系统版本、国家/地区、自定义属性)。

Phase 3: Execute

阶段3:执行

The end to end flow for adding a new subscription product.
添加新订阅产品的完整流程。

Step 1: Add the product in the Play Console

步骤1:在Play Console中添加产品

  1. Open Play Console -> your app -> Monetize -> Products -> Subscriptions.
  2. Click Create subscription.
  3. Set the product ID (for example
    premium_monthly
    ), name, and description.
  4. Add a base plan (billing period, renewal type, price).
  5. Optionally add offers (intro pricing, free trial).
  6. Activate the subscription.
Wait a few minutes for Play to propagate the product.
  1. 打开Play Console -> 你的应用 -> 变现 -> 产品 -> 订阅
  2. 点击创建订阅
  3. 设置产品ID(例如
    premium_monthly
    )、名称和描述。
  4. 添加基础方案(计费周期、续订类型、价格)。
  5. 可选:添加优惠活动(入门定价、免费试用)。
  6. 激活该订阅。
等待几分钟,让Play Console完成产品同步。

Step 2: Import into RevenueCat and attach an entitlement

步骤2:导入到RevenueCat并关联entitlement

  1. Open the RevenueCat dashboard -> your project -> Products.
  2. Click Import to sync from the Play Console. The new product appears in the list.
  3. Open the product and attach it to an existing entitlement, or create a new one.
    • Entitlement example:
      pro
      . Every product that unlocks pro features attaches to
      pro
      .
Your client code checks entitlements by key:
kotlin
val isPro = customerInfo.entitlements["pro"]?.isActive == true
  1. 打开RevenueCat仪表板 -> 你的项目 -> 产品
  2. 点击导入,从Play Console同步数据。新产品会出现在列表中。
  3. 打开该产品,将其关联到现有entitlement,或创建一个新的entitlement。
    • Entitlement示例:
      pro
      。所有解锁专业功能的产品都关联到
      pro
你的客户端代码通过密钥检查entitlements:
kotlin
val isPro = customerInfo.entitlements["pro"]?.isActive == true

Step 3: Wire the product into an Offering as a Package

步骤3:将产品关联到Offering中的Package

  1. In the dashboard, open Offerings.
  2. Pick the offering you want to edit, or create a new one (for example
    default
    ).
  3. Add a Package. Choose a package identifier that matches your paywall:
    • $rc_monthly
      for monthly
    • $rc_annual
      for annual
    • Or a custom identifier
  4. Attach the Play Console product to the package.
  5. Save. Mark the offering as Current if it should be the default.
Your client code stays the same:
kotlin
val offerings = Purchases.sharedInstance.awaitOfferings()
val monthly = offerings.current?.monthly
  1. 在仪表板中打开Offerings
  2. 选择要编辑的offering,或创建一个新的offering(例如
    default
    )。
  3. 添加一个Package。选择与你的付费墙匹配的package标识符:
    • 月度订阅使用
      $rc_monthly
    • 年度订阅使用
      $rc_annual
    • 或自定义标识符
  4. 将Play Console中的产品关联到该package。
  5. 保存。如果该offering应作为默认选项,请标记为“当前”。
你的客户端代码无需修改:
kotlin
val offerings = Purchases.sharedInstance.awaitOfferings()
val monthly = offerings.current?.monthly

Step 4 (optional): Targeting

步骤4(可选):定向规则

If different users should see different offerings, use placements.
  1. In the dashboard, open Targeting -> Placements.
  2. Create a placement (for example
    paywall_upsell
    ).
  3. Add rules (OS version, country, custom attribute) that map users to specific offerings.
Client code:
kotlin
val offering = offerings.getCurrentOfferingForPlacement("paywall_upsell")
    ?: offerings.current
No app update is required when you change targeting rules later.
如果不同用户应看到不同的offerings,请使用展示位置(Placements)。
  1. 在仪表板中打开Targeting -> Placements
  2. 创建一个展示位置(例如
    paywall_upsell
    )。
  3. 添加规则(操作系统版本、国家/地区、自定义属性),将用户映射到特定的offerings。
客户端代码:
kotlin
val offering = offerings.getCurrentOfferingForPlacement("paywall_upsell")
    ?: offerings.current
后续修改定向规则时,无需更新应用。

Phase 4: Verify

阶段4:验证

Check the change landed before you close the task.
CheckHow
Product exists in PlayPlay Console -> Subscriptions shows the product as Active
Product imported to RCDashboard -> Products lists the product
Entitlement mappingDashboard -> Entitlements shows the product under the right entitlement
Offering wiringDashboard -> Offerings shows the product attached to the expected package
Runtime fetchLaunch the app, call
awaitOfferings()
, confirm the package resolves
Entitlement unlockComplete a test purchase, confirm
customerInfo.entitlements["pro"].isActive
is true
If
awaitOfferings()
returns
null
for a package you expect, the most common causes are: the offering is not marked Current, the product is not attached to the package, or Play has not finished propagating the product.
在完成任务前,请确认变更已生效。
检查项检查方式
产品在Play Console中存在Play Console -> 订阅页面显示该产品为“已激活”状态
产品已导入到RevenueCat仪表板 -> 产品列表中显示该产品
Entitlement映射正确仪表板 -> Entitlements页面显示该产品关联到正确的entitlement
Offering关联正确仪表板 -> Offerings页面显示该产品已关联到预期的package
运行时获取正常启动应用,调用
awaitOfferings()
,确认package可正常加载
Entitlement解锁正常完成测试购买,确认
customerInfo.entitlements["pro"].isActive
为true
如果
awaitOfferings()
未返回你预期的package,最常见的原因是:offering未标记为“当前”、产品未关联到package,或者Play Console尚未完成产品同步。

Common Mistakes

常见错误

  • Calling
    monetization.subscriptions
    from your backend. Use RevenueCat instead.
  • Creating an offering before importing the product. Import first, then wire.
  • Shipping hard coded product IDs in your paywall UI. Use package identifiers so you can swap products without an app release.
  • Forgetting to mark an offering as Current. Clients that call
    offerings.current
    will see the old offering until you flip this.
  • 从后端调用
    monetization.subscriptions
    接口。请改用RevenueCat。
  • 在导入产品前创建offering。应先导入产品,再进行关联。
  • 在付费墙UI中硬编码产品ID。请使用package标识符,这样无需发布应用即可替换产品。
  • 忘记将offering标记为“当前”。调用
    offerings.current
    的客户端会一直显示旧的offering,直到你修改此设置。

References

参考资料