Cordova Purchase Plugin

In-App Purchases for Cordova, Capacitor, and Ionic
Need professional help and support? Contact Me.
Summary
This plugin allows In-App Purchases (IAP) to be made from Cordova, Capacitor, and Ionic applications using a single, unified JavaScript API.
It simplifies handling in-app purchases across multiple platforms by abstracting platform-specific complexities.
Supported Platforms & Features:
| Feature | App Store (iOS/macOS) | Google Play (Android) | Braintree (iOS/Android)¹ | Stripe (IapticJS)² | Test Platform |
|---|---|---|---|---|---|
| Consumables | ✅ | ✅ | ✅ | ✅ | ✅ |
| Multi-Quantity Consumables | ✅ | ✅ | |||
| Non-Consumables | ✅ | ✅ | ✅ | ||
| Auto-Renewing Subscriptions | ✅ | ✅ | ✅ | ✅ | |
| Non-Renewing Subscriptions | ✅ | ✅ | |||
| Restore Purchases | ✅ | ✅ | ✅ | ✅ | ✅ |
| Payment Requests | ✅ | ✅ | |||
| Receipt Validation | ✅ | ✅ | ✅ | ✅ | ✅ |
| Introductory Offers | ✅ | ✅ | ✅ | ||
| Promotional Offers (iOS) | ✅ | ||||
| Subscription Offers (GP) | ✅ | ✅ | |||
| Manage Subscriptions UI | ✅ | ✅ | ✅ | ✅ | |
| Manage Billing UI | ✅ | ✅ | ✅ | ✅ |
¹ Requires the cordova-plugin-purchase-braintree extension. ² Web-based payments via Stripe through the IapticJS adapter. Products defined in your Iaptic dashboard.
Documentation
Key Sections:
- Introduction — Overview and core concepts
- Micro Example — Get started with a working example
- Setup — Platform and framework configuration
- Use Cases — Step-by-step guides for each product type
- API Reference — Full API documentation
- Quick Reference — Key types and methods at a glance
- Troubleshooting — Solutions for common problems
- Migration Guide — Upgrading from older versions
Installation
Cordova
cordova plugin add cordova-plugin-purchase
Capacitor
npm install capacitor-plugin-cdv-purchase
npx cap sync
See the Capacitor Setup guide for details.
Ionic
ionic cordova plugin add cordova-plugin-purchase
npm install cordova-plugin-purchase
Sponsors & License
This plugin is maintained thanks to its sponsors. See the full README on GitHub for details.
Licensed under the MIT License.