← 返回 Skills 市场
ivangdavila

In-App Purchases

作者 Iván · GitHub ↗ · v1.0.0
linuxdarwinwin32 ✓ 安全检测通过
616
总下载
2
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install in-app-purchases
功能描述
Implement in-app purchases and subscriptions across iOS, Android, and Flutter with RevenueCat, paywalls, receipt validation, and subscription analytics.
使用说明 (SKILL.md)

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

Topic File
iOS StoreKit 2 storekit.md
Android Billing google-play.md
Flutter packages flutter.md
RevenueCat SDK revenuecat.md
Platform comparison platforms.md
Server verification server.md
Paywall design paywalls.md
Subscription metrics analytics.md
Testing & sandbox testing.md

Core Rules

1. Choose Your Architecture

Approach When to Use Tradeoff
Native only Single platform, full control More code, no cross-platform sync
RevenueCat/Adapty Cross-platform, fast launch 1-2% fee, dependency
Hybrid Native + own backend Full control, more work

2. Platform SDKs (Managed)

Platform Pricing Best For
RevenueCat Free \x3C$2.5k MTR, then 1% Most apps, best docs
Adapty Free \x3C$10k MTR, then 0.6% Cost-conscious, A/B paywalls
Qonversion Free \x3C$10k MTR, then 3% Simple setup
Superwall Paywall-focused Paywall A/B only
Glassfy Free \x3C$10k, then 0.5% Budget option

3. Product Types

Type iOS Android Use Case
Consumable Credits, coins, lives
Non-consumable Unlock feature forever
Auto-renewable Subscriptions
Non-renewing Season 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

State Action
Purchased Verify → grant → finish
Pending Wait, show pending UI
Failed Show error, don't grant
Deferred Wait for parental approval
Refunded Revoke immediately
Grace period Limited access, prompt payment
Billing retry Maintain 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

Environment iOS Android
Dev/Debug StoreKit Config file License testers
Sandbox Sandbox accounts Internal testing
Production Real accounts Production

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
安全使用建议
This package is a set of documentation and code examples for implementing in-app purchases and appears coherent for that purpose, but note the source is unknown and the docs include code that requires sensitive credentials (App Store JWT private key, Google service-account.json, RevenueCat secret API keys, and webhooks). Before using: (1) verify the skill's origin or prefer official vendor docs if provenance matters, (2) never paste private keys or service-account files into public chat — store them securely (secrets manager, environment variables, or vault) and use least-privilege service accounts, (3) implement webhook verification and JWT signature checks as shown to avoid spoofed events, (4) test thoroughly in sandbox environments (StoreKit/Play Console/RevenueCat sandbox) before production, and (5) review the sample server code to ensure you apply secure coding practices (rate limiting, idempotency, logging/audit, and secure storage of raw receipts).
功能分析
Type: OpenClaw Skill Name: in-app-purchases Version: 1.0.0 The OpenClaw AgentSkills skill bundle 'in-app-purchases' is benign. It provides comprehensive documentation and code examples for implementing in-app purchases across various platforms (iOS, Android, Flutter) and using different SDKs (RevenueCat, Adapty). The content covers client-side integration, server-side receipt verification, analytics, and testing. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, prompt injection attempts against the agent, or obfuscation. While the `server.md` file discusses handling sensitive application-level credentials (e.g., Apple App Store Connect private keys, Google service account JSON) for legitimate IAP verification, this is standard practice for secure backend operations and does not indicate malicious intent within the skill bundle itself.
能力评估
Purpose & Capability
Name/description (implement IAPs, subscriptions, RevenueCat, paywalls, receipt validation) match the content of SKILL.md and the included platform/server/paywall docs and code examples. Required env/config/binaries are minimal (none declared) which is reasonable for an instruction-only reference.
Instruction Scope
SKILL.md and the included files focus on platform SDKs, RevenueCat, server verification, webhooks and testing — all in scope. The docs include sample server endpoints, webhook handlers, and examples that show handling receipts, webhooks, and storing raw receipts; these are expected for the stated purpose but mean the implementer will be asked to handle sensitive data and run networked endpoints.
Install Mechanism
Instruction-only skill with no install spec and no code files to execute — low installation risk. All code appears as examples in markdown; nothing is being downloaded or written by the skill itself.
Credentials
The skill declares no required environment variables or credentials, but many examples reference sensitive secrets (App Store JWT private key, Google service-account.json, RevenueCat API keys, webhook endpoints). That is expected for this functionality, but the skill does not itself request or manage those secrets — you will need to supply and protect them when you implement.
Persistence & Privilege
Skill is not marked always:true and does not request persistent system privileges. It is user-invocable and can be invoked autonomously (platform default), which is expected for a skill; nothing in the package attempts to modify other skills or global agent settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install in-app-purchases
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /in-app-purchases 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug in-app-purchases
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

In-App Purchases 是什么?

Implement in-app purchases and subscriptions across iOS, Android, and Flutter with RevenueCat, paywalls, receipt validation, and subscription analytics. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 616 次。

如何安装 In-App Purchases?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install in-app-purchases」即可一键安装,无需额外配置。

In-App Purchases 是免费的吗?

是的,In-App Purchases 完全免费(开源免费),可自由下载、安装和使用。

In-App Purchases 支持哪些平台?

In-App Purchases 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。

谁开发了 In-App Purchases?

由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.0。

💬 留言讨论