/capacitor-integrations:capacitor-in-app-purchasesfrom capacitor-integrations
Guides setting up in-app purchases and subscriptions in Capacitor apps, covering App Store Connect and Google Play Console configuration, plugin selection (Capawesome Purchases vs RevenueCat), purchase flows, server-side validation, and testing.
Ships in capacitor-integrations. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Set up in-app purchases and subscriptions in Capacitor apps, covering store configuration, plugin integration, purchase flows, server-side validation, and testing.
@capawesome-team/capacitor-purchases 0.4.x) requires Capacitor 8 or later. For RevenueCat, read the supported Capacitor version from the package itself: npm view @revenuecat/purchases-capacitor peerDependencies. Capacitor 9 is not covered by this skill yet.android/, ios/), package.json dependencies, and Capacitor version. Only ask the user when something cannot be detected.npm config set for the registry or the key. Use the Premium SDK setup that references/capawesome-purchases-setup.md points to.Two hosted MCP servers serve the current documentation, so both are always ahead of the guidance bundled with this skill:
capacitor.config file, the native Android and iOS projects, and the official plugin APIs.Both expose search_docs and get_doc_page, so pick the server by topic before calling either.
search_docs on the server that owns the topic and read the matching page with get_doc_page before applying the guidance below. Where the two disagree, follow the documentation.claude mcp add --transport http capawesome "https://mcp.capawesome.io/mcp"
claude mcp add --transport http capacitor "https://capacitor-mcp.capawesome.io/mcp"
Neither server needs an account or a token for documentation. See the capawesome-mcp and capacitor-mcp skills for full setup, including the Capawesome Cloud tools.
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. If the major version is below 8, Capawesome Purchases cannot be installed. Offer the capacitor-app-upgrades skill or RevenueCat.@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.ios/ exists): Run xcodebuild -version. Capawesome Purchases needs Xcode 26.5 or later.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): Uses StoreKit 2 and the Google Play Billing Library directly, with no third-party service in between. It is a Premium SDK and needs a Capawesome Cloud plan: the Standard plan includes one Premium SDK of the customer's choice, the Advanced plan includes all of them. The organization must select the SDK on the Billing page before a license key can install it. Server-side 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 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:
With Capawesome Purchases, three rules decide whether purchases work in production. Apply all of them:
finishTransaction(...) after the content is delivered. Google Play refunds a purchase that is not acknowledged within three days.isConsumable: true to finishTransaction(...) for consumables only. Since plugin version 0.4.0 a purchase is acknowledged by default and not consumed, so a consumable without this option cannot be bought again.getUnfinishedTransactions() on every app start and every time the app returns to the foreground.Ask the user which optional features to enable:
oldProductId and replacementMode (Capawesome Purchases, Android). On iOS the App Store handles this inside a subscription group.isIntroOfferAvailableForProduct(...). Only the Capawesome reference of this skill covers it.appAccountToken (iOS) and obfuscatedAccountId (Android), so that server notifications can be matched to a user.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:
Sync once after all native and configuration changes:
npx cap sync
List the available devices, then build and run on one device per platform. Without --target the Capacitor CLI asks for a device in the terminal:
npx cap run android --list
npx cap run android --target <DEVICE_ID>
npx cap run ios --list
npx cap run ios --target <DEVICE_ID>
A real purchase on Android needs a build installed from Google Play, see references/testing.md.
Capawesome Purchases rejects with an error that carries a code. Compare the code, never the message:
code | Platform | Meaning and fix |
|---|---|---|
USER_CANCELED | Android, iOS | The user closed the payment sheet. Not an error. Do nothing. |
PENDING | Android, iOS | The purchase needs a further step from the user. Do not deliver content. The transaction appears in getUnfinishedTransactions() once the purchase completes. |
PRODUCT_ALREADY_OWNED | Android | The user owns the product. For a consumable, the earlier purchase was never consumed. Process it from getUnfinishedTransactions() and finish it with isConsumable: true. |
PRODUCT_UNAVAILABLE | Android | The product cannot be bought. Check that the product and its base plans are active and available in the tester's country. |
VERIFICATION_FAILED | iOS | The App Store could not verify the transaction. Do not deliver content. |
UNAVAILABLE | Android, iOS | In-app purchases are not available on this device. Call isAvailable() first and hide the paywall. |
INVALID_PLAN_TYPE | iOS | The planType value is not a supported billing plan type. Use MONTHLY or UP_FRONT. |
Other common problems:
getProductsByIds(...) leaves unknown products out and does not throw. Check the agreements, the Business section, and the product status in App Store Connect, in that order. Changes to product metadata can take up to an hour to reach the sandbox.finishTransaction(...) after every purchase.finishTransaction(...) was called without isConsumable: true. Call finishTransaction({ transactionId, isConsumable: true }) for the still owned purchase.transaction.verificationResult (a JWS) to the backend. On Android, send transaction.token and look it up with the Google Play Developer API. A sandbox transaction fails a verifier that is set to the production environment.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.npm install fails with 401 Unauthorized or 403 Forbidden: The Capawesome npm registry rejected the request. Use the table "Install errors" in references/premium-sdk-setup.md of the capacitor-plugins skill.xcodebuild -version. The plugin needs Xcode 26.5 or later.npx cap sync was run after installation.@capacitor/core version in package.json.capacitor-plugins: For general Capacitor plugin installation and configuration. Its step "Set Up Access to a Premium SDK" (Step 4 of its SKILL.md, described in its references/premium-sdk-setup.md) holds the full setup of the Capawesome npm registry for Premium SDKs.capawesome-cloud: For Capawesome Cloud plans, native builds, and app store publishing after in-app purchases are configured.capacitor-app-upgrades: Upgrade the app to Capacitor 8 before installing Capawesome Purchases.capawesome-mcp — Connect an MCP client to the hosted Capawesome MCP server for always-current documentation and Capawesome Cloud management.capacitor-mcp: Connect an MCP client to the hosted Capacitor MCP server for the current Capacitor documentation.references/app-store-connect-setup.md (opens in a new tab)references/capawesome-purchases-implementation.md (opens in a new tab)references/capawesome-purchases-setup.md (opens in a new tab)references/google-play-console-setup.md (opens in a new tab)references/revenuecat-implementation.md (opens in a new tab)references/revenuecat-setup.md (opens in a new tab)references/testing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
in-app-purchases, subscriptions, capacitor, mobile-payments, storekit
2 skills in this plugin
npx claudepluginhub capawesome-team/skills --plugin capacitor-integrationsOther plugins' skills for the same job