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:
- 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
1---
2name: in-app-purchases
3slug: in-app-purchases
4version: 1.0.0
5description: Implement in-app purchases and subscriptions across iOS, Android, and Flutter with RevenueCat, paywalls, receipt validation, and subscription analytics.
6metadata:
7 source: https://skillmd.com/skills/modbender/in-app-purchases
8 clawdbot:
9 emoji: 💳
10 requires:
11 bins: []
12 os:
13 - linux
14 - darwin
15 - win32
16---
17
18## When to Use
19
20User 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.
21
22## Quick Reference
23
24| Topic | File |
25|-------|------|
26| iOS StoreKit 2 | `storekit.md` |
27| Android Billing | `google-play.md` |
28| Flutter packages | `flutter.md` |
29| RevenueCat SDK | `revenuecat.md` |
30| Platform comparison | `platforms.md` |
31| Server verification | `server.md` |
32| Paywall design | `paywalls.md` |
33| Subscription metrics | `analytics.md` |
34| Testing & sandbox | `testing.md` |
35
36## Core Rules
37
38### 1. Choose Your Architecture
39| Approach | When to Use | Tradeoff |
40|----------|-------------|----------|
41| Native only | Single platform, full control | More code, no cross-platform sync |
42| RevenueCat/Adapty | Cross-platform, fast launch | 1-2% fee, dependency |
43| Hybrid | Native + own backend | Full control, more work |
44
45### 2. Platform SDKs (Managed)
46| Platform | Pricing | Best For |
47|----------|---------|----------|
48| RevenueCat | Free <$2.5k MTR, then 1% | Most apps, best docs |
49| Adapty | Free <$10k MTR, then 0.6% | Cost-conscious, A/B paywalls |
50| Qonversion | Free <$10k MTR, then 3% | Simple setup |
51| Superwall | Paywall-focused | Paywall A/B only |
52| Glassfy | Free <$10k, then 0.5% | Budget option |
53
54### 3. Product Types
55| Type | iOS | Android | Use Case |
56|------|-----|---------|----------|
57| Consumable | ✅ | ✅ | Credits, coins, lives |
58| Non-consumable | ✅ | ✅ | Unlock feature forever |
59| Auto-renewable | ✅ | ✅ | Subscriptions |
60| Non-renewing | ✅ | ❌ | Season pass, time-limited |
61
62### 4. Server Verification is Non-Negotiable
63Never trust client-side validation alone:
64- iOS: App Store Server API with JWS verification
65- Android: Google Play Developer API
66- RevenueCat: Webhooks + REST API
67
68### 5. Handle All Transaction States
69| State | Action |
70|-------|--------|
71| Purchased | Verify → grant → finish |
72| Pending | Wait, show pending UI |
73| Failed | Show error, don't grant |
74| Deferred | Wait for parental approval |
75| Refunded | Revoke immediately |
76| Grace period | Limited access, prompt payment |
77| Billing retry | Maintain access during retry |
78
79### 6. Subscription Lifecycle Events
80Must handle all of these (native or via webhooks):
81- INITIAL_PURCHASE → grant access
82- RENEWAL → extend access
83- CANCELLATION → mark will-expire
84- EXPIRATION → revoke access
85- BILLING_ISSUE → prompt to update payment
86- GRACE_PERIOD → limited access window
87- PRICE_INCREASE → consent required (iOS)
88- REFUND → revoke + flag user
89- UPGRADE/DOWNGRADE → prorate
90
91### 7. Restore Purchases Always
92Required by App Store guidelines:
93- Prominent restore button
94- Works for logged-out users
95- Handles family sharing (iOS)
96- Cross-device sync
97
98### 8. Paywall Best Practices
99See `paywalls.md` for detailed patterns:
100- Show value before price
101- Anchor pricing (3 options, highlight middle)
102- Free trial prominent
103- Social proof if available
104- A/B test everything
105
106### 9. Testing Strategy
107| Environment | iOS | Android |
108|-------------|-----|---------|
109| Dev/Debug | StoreKit Config file | License testers |
110| Sandbox | Sandbox accounts | Internal testing |
111| Production | Real accounts | Production |
112
113Sandbox subscription times:
114- 1 week → 3 minutes
115- 1 month → 5 minutes
116- 1 year → 1 hour
117
118### 10. App Store Guidelines
119- No external payment links (anti-steering)
120- Must use IAP for digital goods
121- Physical goods/services can use Stripe
122- Reader apps have exceptions
123- 15-30% commission applies
124
125## Common Traps
126
127- Testing with real money → use sandbox/test accounts
128- Not finishing transactions → auto-refund (Android 3 days)
129- Hardcoding prices → always fetch from store (regional pricing)
130- Missing transaction observer → lose purchases made outside app
131- No server verification → trivially bypassable
132- Ignoring grace period → users churn when they could recover
133- Poor paywall UX → kills conversion regardless of price
134- Not tracking metrics → can't optimize what you don't measure
135- Forgetting restore button → App Store rejection
136- Not handling family sharing → confused users