Purchases
Purchases is a cross platform solution for managing in-app subscriptions. A backend is also provided via RevenueCat
#
Featuresโ | Server-side receipt validation |
โก๏ธ | Webhooks - enhanced server-to-server communication with events for purchases, renewals, cancellations, and more |
๐ฏ | Subscription status tracking - know whether a user is subscribed whether they're on iOS, Android or web |
๐ | Analytics - automatic calculation of metrics like conversion, mrr, and churn |
๐ | Online documentation up to date |
๐ | Integrations - over a dozen integrations to easily send purchase data where you need it |
๐ฏ | Well maintained - frequent releases |
๐ฎ | Great support - Help Center |
๐คฉ | Awesome new features |
#
Getting StartedFor more detailed information, you can view our complete documentation at docs.revenuecat.com.
https://github.com/RevenueCat/cordova-plugin-purchases
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionicโs experts offer premium advisory services for both community plugins and premier plugins.
Installation#
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-plugin-purchases@2.0.0 $ npm install @ionic-native/purchases $ ionic cap sync
$ ionic cordova plugin add cordova-plugin-purchases@2.0.0 $ npm install @ionic-native/purchases
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. ย Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- Android
- iOS
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angular#
1. Get a RevenueCat API keyLog in to the RevenueCat dashboard and obtain a free API key for your application.
#
2. Initialize the SDKYou should only configure Purchases once (usually on app launch) as soon as your app has a unique user id for your user. This can be when a user logs in if you have accounts or on launch if you can generate a random user identifier.
import { Platform } from "@ionic/angular"; import { Purchases } from "@ionic-native/purchases/ngx";
constructor(public platform: Platform, private purchases: Purchases) { platform.ready().then(() => { this.purchases.setDebugLogsEnabled(true); // Enable to get debug logs this.purchases.setup("my_api_key", "my_app_user_id"); } }
#
3. QuickstartPlease follow the Quickstart Guide for more information on how to use the SDK
#
RequirementsRequires XCode 11.0+ and minimum target iOS 9.0+ This plugin has been tested with cordova-plugin-purchases@