In-app purchases in Capacitor (and making revenue)
Add subscriptions and in-app purchases to a Capacitor app with StoreKit and Google Play Billing, stay compliant with store rules, and iterate your paywall over the air to grow revenue.
If your Capacitor app sells digital goods or subscriptions, Apple and Google require you to use their in-app purchase systems — StoreKit and Google Play Billing — and take their cut. Getting IAP right is part native integration, part store-compliance, and part relentless paywall iteration. This guide covers all three, and where OtaKit lets you optimize the revenue-critical parts without a store review.
The compliance line: digital goods consumed in the app must go through IAP. Physical goods and real-world services use normal payment processors. Getting this wrong is a guaranteed rejection.
1. Use a maintained IAP plugin
Don't hand-roll StoreKit and Billing bindings. Use a Capacitor IAP plugin that wraps both, handles the purchase lifecycle, and surfaces receipts:
npx cap sync
2. Configure products in the stores
- Define products/subscriptions in App Store Connect and Google Play Console.
- Match the product IDs exactly in your app config.
- Set up sandbox/test accounts — you can't test real purchases against production.
3. Verify receipts server-side
Never grant entitlements based on the client alone. Validate the receipt with Apple/Google from your backend, then unlock the feature. This is the difference between a paywall and a suggestion.
4. Iterate the paywall over the air
The native purchase mechanism is fixed once shipped, but the paywall— layout, copy, pricing display, which plan is highlighted, the trial framing — is web-layer UI, and it's the single highest-leverage thing to A/B test. Ship variants over the air and measure:
otakit upload --release experiment-paywall-b
Combine with A/B testing to find the paywall that converts, then promote it — no store cycle per iteration.
Being able to tune pricing presentation and paywall copy the same day, instead of every two weeks, compounds fast on revenue. This is one of the strongest business cases for OTA in a paid app.
Where to go next
See passing app review for the IAP compliance pitfalls, and feature flags to gate premium features.