← 返回
数据分析 中文

In-App Purchases

Implement in-app purchases and subscriptions across iOS, Android, and Flutter with RevenueCat, paywalls, receipt validation, and subscription analytics.
使用 RevenueCat 在 iOS、Android 和 Flutter 上实现应用内购买和订阅,包括付费墙、收据验证和订阅分析。
ivangdavila
数据分析 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 2
Stars
📥 866
下载
💾 26
安装
1
版本
#latest

概述

When to Use

User needs to implement in-app purchases, subscriptions, paywalls, or monetization flows. Agent handles native APIs (StoreKit 2, Google Play Billing), cross-platform SDKs (RevenueCat, Adapty, Qonversion), paywall design, server verification, and subscription analytics.

Quick Reference

TopicFile
-------------
iOS StoreKit 2storekit.md
Android Billinggoogle-play.md
Flutter packagesflutter.md
RevenueCat SDKrevenuecat.md
Platform comparisonplatforms.md
Server verificationserver.md
Paywall designpaywalls.md
Subscription metricsanalytics.md
Testing & sandboxtesting.md

Core Rules

1. Choose Your Architecture

ApproachWhen to UseTradeoff
---------------------------------
Native onlySingle platform, full controlMore code, no cross-platform sync
RevenueCat/AdaptyCross-platform, fast launch1-2% fee, dependency
HybridNative + own backendFull control, more work

2. Platform SDKs (Managed)

PlatformPricingBest For
-----------------------------
RevenueCatFree <$2.5k MTR, then 1%Most apps, best docs
AdaptyFree <$10k MTR, then 0.6%Cost-conscious, A/B paywalls
QonversionFree <$10k MTR, then 3%Simple setup
SuperwallPaywall-focusedPaywall A/B only
GlassfyFree <$10k, then 0.5%Budget option

3. Product Types

TypeiOSAndroidUse Case
------------------------------
ConsumableCredits, coins, lives
Non-consumableUnlock feature forever
Auto-renewableSubscriptions
Non-renewingSeason pass, time-limited

4. Server Verification is Non-Negotiable

Never trust client-side validation alone:

  • iOS: App Store Server API with JWS verification
  • Android: Google Play Developer API
  • RevenueCat: Webhooks + REST API

5. Handle All Transaction States

StateAction
---------------
PurchasedVerify → grant → finish
PendingWait, show pending UI
FailedShow error, don't grant
DeferredWait for parental approval
RefundedRevoke immediately
Grace periodLimited access, prompt payment
Billing retryMaintain access during retry

6. Subscription Lifecycle Events

Must handle all of these (native or via webhooks):

  • INITIAL_PURCHASE → grant access
  • RENEWAL → extend access
  • CANCELLATION → mark will-expire
  • EXPIRATION → revoke access
  • BILLING_ISSUE → prompt to update payment
  • GRACE_PERIOD → limited access window
  • PRICE_INCREASE → consent required (iOS)
  • REFUND → revoke + flag user
  • UPGRADE/DOWNGRADE → prorate

7. Restore Purchases Always

Required by App Store guidelines:

  • Prominent restore button
  • Works for logged-out users
  • Handles family sharing (iOS)
  • Cross-device sync

8. Paywall Best Practices

See paywalls.md for detailed patterns:

  • Show value before price
  • Anchor pricing (3 options, highlight middle)
  • Free trial prominent
  • Social proof if available
  • A/B test everything

9. Testing Strategy

EnvironmentiOSAndroid
---------------------------
Dev/DebugStoreKit Config fileLicense testers
SandboxSandbox accountsInternal testing
ProductionReal accountsProduction

Sandbox subscription times:

  • 1 week → 3 minutes
  • 1 month → 5 minutes
  • 1 year → 1 hour

10. App Store Guidelines

  • No external payment links (anti-steering)
  • Must use IAP for digital goods
  • Physical goods/services can use Stripe
  • Reader apps have exceptions
  • 15-30% commission applies

Common Traps

  • Testing with real money → use sandbox/test accounts
  • Not finishing transactions → auto-refund (Android 3 days)
  • Hardcoding prices → always fetch from store (regional pricing)
  • Missing transaction observer → lose purchases made outside app
  • No server verification → trivially bypassable
  • Ignoring grace period → users churn when they could recover
  • Poor paywall UX → kills conversion regardless of price
  • Not tracking metrics → can't optimize what you don't measure
  • Forgetting restore button → App Store rejection
  • Not handling family sharing → confused users

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 08:27 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,359 📥 318,562
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 147,769
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,997