RevenueCat

Build With RevenueCat

Build a customized mobile subscription business with RevenueCat. We do the heavy lifting of normalizing subscribers from any source and maintain a single source of truth for subscription status, so you can get back to building your app.

RevenueCat is a powerful, secure, reliable, and free to use in-app purchase server with global support. All you need to get started is an API key.

Get Started    API Reference

Ionic

Instructions for Installing Purchases SDK for Ionic

Please refer to our documentation in Ionic Native Plugin documentation for installation instructions.

// Install Cordova plugin
ionic cordova plugin add cordova-plugin-purchases

// Install TypeScript wrapper
npm install @ionic-native/purchases

// Install Ionic Native core library (once per project)
npm install @ionic-native/core
// Install Cordova plugin
npm install cordova-plugin-purchases

// Install Ionic Native core library (once per project)
npm install @ionic-native/core

// Install TypeScript wrapper
npm install @ionic-native/purchases

// Update native platform project(s) to include newly added plugin
ionic cap sync

Angular

Angular apps can use either Cordova or Capacitor to build native mobile apps. For Angular, the import path should end with /ngx.

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");
     }
 }

React

Import the plugin object then use its static methods:

import { Purchases } from '@ionic-native/purchases';

const Tab1: React.FC = () => {
  Purchases.setDebugLogsEnabled(true);
  Purchases.setup("my_api_key", "my_app_user_id");
  return (
    <IonPage>
      <IonHeader>
        <IonToolbar>
          <IonTitle>Tab 1</IonTitle>
        </IonToolbar>
      </IonHeader>
      <IonContent>
        <IonButton onClick={openScanner}>Scan barcode</IonButton>
      </IonContent>
    </IonPage>
  );
};

Updated 4 months ago


Ionic


Instructions for Installing Purchases SDK for Ionic

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.