agentsclimarketplace

In app purchases

Skill launch52-ai/flutter-template/.claude/skills/in-app-purchases

Template for Flutter mobile applications.

Install
npx -y skills add launch52-ai/flutter-template --skill in-app-purchases

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

In-app purchases and subscriptions with RevenueCat. Product configuration, entitlements, paywalls, restore purchases, subscription status. Use when implementing subscriptions, one-time purchases, paywalls, or monetization.

SKILL.md

6.6 KB, as published. Nobody here has run it

In-App Purchases & Subscriptions

Monetize your Flutter app with RevenueCat - the industry-standard solution for in-app purchases and subscriptions. Handles cross-platform billing, receipt validation, and subscription management.

When to Use This Skill

  • Adding subscriptions or one-time purchases
  • Implementing a paywall
  • Managing premium features/entitlements
  • Restoring purchases
  • User asks "add subscription", "paywall", "in-app purchase", "monetize", or "RevenueCat"

Questions to Ask

  1. Purchase types: Subscriptions, one-time purchases, or both?
  2. Subscription tiers: Free, premium only, or multiple tiers (basic/pro/enterprise)?
  3. Trial period: Offer free trial? How long?
  4. Paywall trigger: Where should the paywall appear? (feature-gated, onboarding, settings)
  5. Restore flow: Where should users restore purchases? (settings, paywall)

Quick Reference

RevenueCat Concepts

ConceptDescription
OfferingContainer for products shown to users (e.g., "default", "sale")
PackageSpecific product in an offering (e.g., "monthly", "annual")
EntitlementAccess level granted by purchase (e.g., "premium", "pro")
CustomerInfoUser's purchase state, active entitlements, subscriptions

Product Types

TypeUse CaseExample
Auto-renewableRecurring accessMonthly/annual subscription
Non-consumablePermanent unlockRemove ads, lifetime access
ConsumableOne-time useCredits, coins

Reference Files

  • reference/services/purchases_service.dart - RevenueCat wrapper
  • reference/repositories/ - Domain interface + implementation
  • reference/providers/purchases_providers.dart - Riverpod state
  • reference/failures/purchases_failures.dart - Sealed failures
  • reference/models/subscription_status.dart - Freezed models

Workflow

Phase 1: RevenueCat Setup

  1. Create RevenueCat account at revenuecat.com
  2. Create a new project in RevenueCat dashboard
  3. Add App Store Connect and Play Console credentials
  4. Create products in App Store Connect / Google Play Console
  5. Configure products in RevenueCat → Products
  6. Create Entitlements (e.g., "premium")
  7. Create Offerings and add Packages

See: revenuecat-setup-guide.md

Phase 2: Platform Configuration

iOS:

  • Enable In-App Purchase capability in Xcode
  • Add StoreKit configuration file for testing
  • Configure App Store Connect shared secret in RevenueCat

Android:

  • Add billing permission to AndroidManifest.xml
  • Configure Play Console service account in RevenueCat
  • Upload signed APK/AAB to internal testing track

See: platform-setup-guide.md

Phase 3: Implementation

  1. Add purchases_flutter dependency
  2. Copy reference files to project
  3. Initialize RevenueCat in main.dart
  4. Create paywall UI
  5. Implement entitlement checks
  6. Add restore purchases flow
  7. Handle subscription changes

See: implementation-guide.md

Phase 4: Testing

  1. Test with StoreKit configuration (iOS Simulator)
  2. Test with sandbox accounts (real devices)
  3. Test restore purchases
  4. Test subscription lifecycle (renew, cancel, expire)
  5. Verify webhook events in RevenueCat dashboard

Core API

await PurchasesService.instance.initialize(apiKey: key); // in main.dart
final isPremium = ref.watch(isPremiumProvider);           // check entitlement
await ref.read(purchasesRepositoryProvider).purchase(pkg); // purchase
await ref.read(purchasesRepositoryProvider).restorePurchases(); // restore

See: implementation-guide.md for complete examples.

Dependencies

dependencies:
  purchases_flutter: ^8.0.0

Failure Types

TypeWhenUI Action
PurchaseCancelledUser cancelledDismiss silently
PurchasePendingPayment pending (e.g., parental approval)Show "pending" message
ProductNotFoundInvalid product IDLog error, hide product
NetworkErrorNo connectionShow retry option
StoreErrorApp Store/Play Store errorShow generic error
NotAllowedDevice restrictedShow restriction message

Guides

FileContent
revenuecat-setup-guide.mdDashboard configuration
platform-setup-guide.mdiOS & Android platform setup
implementation-guide.mdCode implementation steps
paywall-guide.mdPaywall UI patterns
testing-guide.mdSandbox testing
checklist.mdVerification checklist

Checklist

Setup:

  • RevenueCat project created with credentials
  • Products configured in App Store Connect / Play Console
  • Entitlements and Offerings configured

Platform:

  • iOS: In-App Purchase capability, StoreKit config
  • Android: BILLING permission, app uploaded to testing track

Implementation:

  • RevenueCat initialized, providers created
  • Paywall with restore purchases button
  • Entitlement checks gating premium features

See: checklist.md for complete verification list.

Common Issues

Purchases not showing in RevenueCat

Ensure products are "Ready to Submit" in App Store Connect or "Active" in Play Console. RevenueCat can only fetch approved products.

"Cannot connect to App Store" on Simulator

Use StoreKit Configuration file for Simulator testing. Real App Store requires physical device with sandbox account.

Android purchases failing silently

Ensure the app is uploaded to at least internal testing track. Google Play billing requires a signed release build.

Related Skills

  • /analytics - Track purchase events, revenue
  • /auth - User identification for RevenueCat
  • /design - Paywall UI design patterns
  • /i18n - Localized paywall text, pricing
  • /testing - Mock purchases for tests
  • /force-update - Version gating with subscriptions

Next Steps

After implementing purchases:

  1. /analytics - Track purchase events and revenue
  2. /i18n - Localize paywall and product descriptions
  3. /testing - Create mock repository for tests

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.