skills/capacitor-in-app-purchases/SKILL.md
Guides the agent through setting up in-app purchases in Capacitor apps. Covers App Store Connect and Google Play Console product configuration, plugin selection (Capawesome Purchases vs. RevenueCat), plugin installation and platform setup, purchase flows for subscriptions and consumables, receipt validation, restore purchases, handling unfinished transactions, and testing with sandbox and StoreKit environments. Do not use for non-Capacitor mobile frameworks, Stripe payment processing, or physical goods checkout.
npx skillsauth add capawesome-team/skills capacitor-in-app-purchasesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Set up in-app purchases and subscriptions in Capacitor apps, covering store configuration, plugin integration, purchase flows, receipt validation, and testing.
android/, ios/), package.json dependencies, and Capacitor version. Only ask the user when something cannot be detected.Auto-detect the following by reading project files — do not ask the user for information that can be inferred:
android/, ios/). These are the platforms to configure.@capacitor/core version from package.json.@capawesome-team/capacitor-purchases, @revenuecat/purchases-capacitor, or any other in-app purchase plugin is already in package.json. If found, inform the user and ask whether to continue with the existing plugin or switch.Skip if ios/ does not exist.
Read references/app-store-connect-setup.md and guide the user through creating in-app purchase products and subscriptions in App Store Connect. This covers:
Skip if android/ does not exist.
Read references/google-play-console-setup.md and guide the user through creating in-app purchase products in Google Play Console. This covers:
Ask the user which plugin to use:
@capawesome-team/capacitor-purchases) — Lightweight, no third-party backend dependency. Requires a Capawesome Insiders license. Server-side receipt validation is the developer's responsibility.@revenuecat/purchases-capacitor) — Full backend service with server-side receipt validation, entitlement management, analytics, and integrations. Requires a RevenueCat account.Default recommendation: Capawesome Purchases for apps that already have a backend for receipt validation or want to avoid third-party dependencies. RevenueCat for apps that want managed receipt validation and subscription analytics out of the box.
Based on the user's choice in Step 4:
references/capawesome-purchases-setup.md and follow the installation and platform configuration steps.references/revenuecat-setup.md and follow the installation and platform configuration steps.Based on the user's plugin choice:
references/capawesome-purchases-implementation.md and add the purchase code to the project.references/revenuecat-implementation.md and add the purchase code to the project.Adapt imports and code structure to match the user's framework (Angular, React, Vue, etc.).
The implementation covers:
Ask the user which optional features to enable:
For each selected feature, read the corresponding implementation reference file and apply the relevant code.
Read references/testing.md and guide the user through testing in-app purchases on both platforms. This covers:
npx cap sync
Build and run on each platform to verify purchases work end-to-end:
npx cap run android
npx cap run ios
purchaseProduct() returns error on Android: Verify google-services.json is present and the Google Play Billing Library version is compatible. Check $googlePlayBillingVersion in android/variables.gradle.transaction.verificationResult. On Android, validate transaction.token, transaction.originalJson, and transaction.signature against the Google Play Developer API.syncTransactions() displays a system authentication dialog — it must be called in response to an explicit user action (e.g., a "Restore Purchases" button tap). On Android, it runs silently.finishTransaction() not called: Unfinished transactions block future purchases on some platforms. Always call finishTransaction() after delivering content. Check for unfinished transactions at every app launch.npx cap sync was run after installation. For Capawesome Purchases, verify the Capawesome npm registry is configured.@capacitor/core version in package.json.capacitor-plugins — For general Capacitor plugin installation and configuration, including the Capawesome Purchases and RevenueCat plugins.capawesome-cloud — For app store publishing after in-app purchases are configured.tools
A comprehensive starting point for AI agents to work with the Ionic Framework. Covers core concepts, components, CLI, theming, layout, lifecycle, navigation, and framework-specific patterns for Angular, React, and Vue. Pair with the other Ionic skills in this collection for deeper topic-specific guidance like app creation, framework integration, and upgrades.
tools
Guides the agent through setting up and using Capawesome Cloud for Capacitor and Cordova apps. Covers three core workflows: (1) Native Builds — cloud builds for iOS and Android (Capacitor, Cordova, or native projects), signing certificates, environments, Trapeze configuration, and build artifacts; (2) Live Updates — OTA updates via the @capawesome/capacitor-live-update or @capawesome/cordova-live-update plugin, channels, versioning, rollbacks, and code signing; (3) App Store Publishing — automated submissions to Apple App Store (TestFlight) and Google Play Store. Includes CI/CD integration for all workflows. Do not use for non-Capacitor, non-Cordova mobile frameworks such as React Native or Flutter.
tools
Guides the agent through installing, authenticating, configuring, and using the Capawesome CLI (@capawesome/cli). Covers installation, interactive and token-based authentication, project linking via capawesome.config.json, the full command reference (app management, native builds, live updates, certificates, environments, channels, deployments, destinations, devices), CI/CD integration with token auth and JSON output, and diagnostics via the doctor command. Do not use for Capawesome Cloud feature setup (native builds workflow, live updates workflow, app store publishing) — use the capawesome-cloud skill instead.
tools
A comprehensive starting point for AI agents to work with Capacitor. Covers core concepts, CLI, app creation, plugins, framework integration, best practices, storage, security, testing, troubleshooting, upgrading, and Capawesome Cloud (live updates, native builds, app store publishing). Pair with the other Capacitor skills in this collection for deeper topic-specific guidance.