In app purchases

From clawic/skills · View interactive version

In app purchases is an AI agent skill from the GitHub repository clawic/skills. Implement in-app purchases and subscriptions across iOS, Android, and Flutter with RevenueCat, paywalls, receipt validation, and subscription analytics.

How to use this skill

Skill file

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 <$2.5k MTR, then 1% | Most apps, best docs |

| Adapty | Free <$10k MTR, then 0.6% | Cost-conscious, A/B paywalls |

| Qonversion | Free <$10k MTR, then 3% | Simple setup |

| Superwall | Paywall-focused | Paywall A/B only |

| Glassfy | Free <$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:

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):

7. Restore Purchases Always

Required by App Store guidelines:

8. Paywall Best Practices

See paywalls.md for detailed patterns:

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:

10. App Store Guidelines

Common Traps

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.