Subscription Management Mode

This guide is for managing subscription-based access management using Qonversion (Subscription Management mode).

The Subscription Management mode allows you to implement a full-cycle of in-app purchases management: getting offers, making (or restoring) purchases and handling entitlements.

If you want only to get a single source of truth for revenue analytics and leverage real-time purchase events in integrations, please refer to the Analytics Mode guide.

1. Configure Products & Permissions (Entitlements)

To successfully run subscription-based entitlements management you need to connect stores' products with Qonversion.

  1. Create and configure in-app products on the App Store Connect and/or Google Play Console sides
  2. Create product-linker in Qonversion. Learn more about Qonversion products here.
  3. Create permission which should be granted after the product is purchased. Learn more about Qonversion permissions here.

2. Configure Offerings

An offering is a group of products that you can offer to a user on a given paywall based on your business logic. For example, you can offer one set of products on a paywall immediately after onboarding and another set of products with discounts later on if a user has not converted.

Qonversion offerings are not required to use Qonversion's Infrastructure Mode, but they allow you to change products offered to your users without app release.

Learn more about Qonversion Offerings here.

3. Launch SDK

Import the Qonversion SDK in your module that is responsible for launching third-party dependencies:

import Qonversion
#import "Qonversion.h"
import com.qonversion.android.sdk.Qonversion;
import com.qonversion.android.sdk.Qonversion
import 'package:qonversion_flutter/qonversion_flutter.dart';
import Qonversion from 'react-native-qonversion';
using QonversionUnity;

Initialize the SDK:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  
    Qonversion.launch(withKey: "projectKey")
    return true
}
#import "Qonversion.h"
  
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [Qonversion launchWithKey:@"projectKey"];
    
    return YES;
}
public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Qonversion.launch(this, "projectKey", false);
    }
}
public class App : Application {
    override fun onCreate() {
        super.onCreate()
        Qonversion.launch(this, "projectKey", false)
    }
}
Qonversion.launch('projectKey', isObserveMode: false);
Qonversion.launchWithKey('projectKey', false);
public class QonversionLauncher : MonoBehaviour
{
    private void Start()
    {
        Qonversion.Launch("projectKey", false);
    }
}
Qonversion.launchWithKey('projectKey', false);

Get your Qonversion Project Key

4. (Optional) Set User ID

If you want to implement the cross-platform (Android, IOS, and Web) user entitlement management, please, follow the User Identity guide.

To match Qonversion revenue events to users in third-party tools, you need to set the same user IDs in all of them:

Qonversion.setProperty(.userID, value: "yourSideUserId")
[Qonversion setProperty:QNPropertyUserID value:@"yourSideUserId"];
Qonversion.setProperty(QUserProperties.CustomUserId, "yourSideUserID");
Qonversion.setProperty(QUserProperties.CustomUserId, "yourSideUserID")
Qonversion.setProperty(QUserProperty.customUserId, 'yourSideUserId');
Qonversion.setProperty(Property.CUSTOM_USER_ID, 'yourSideUserId');
Qonversion.SetProperty(UserProperty.CustomUserId, "yourSideUserId");
Qonversion.setUserId('yourSideUserID');

The user ID improves the quality of events matching to the platforms where event attribution is not exclusively based on IDFA or GAID.

5. (Optional) Set IDFA (Identifier for Advertisers, iOS 14.5+ only)

On iOS 14.5+, after requesting the app tracking permission using ATT, you need to notify Qonversion if tracking is allowed and IDFA is available. This will help to have precise attribution in Adjust, AppsFlyer, Singular and other Qonversion integrations.

ATTrackingManager.requestTrackingAuthorization { status in
    switch status {
    case .authorized:
        Qonversion.setAdvertisingID()
      
    // handle other states below
    }
}
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
    switch (status) {
        case ATTrackingManagerAuthorizationStatusAuthorized:
            [Qonversion setAdvertisingID];
            break;
        
        // handle other states if needed
        
        default:
          break;
    }
}];
Qonversion.setAdvertisingID();
Qonversion.setAdvertisingID();
Qonversion.SetAdvertisingID();
Qonversion.setAdvertisingID();

6. (Optional) Set ASID (App set ID, Android 12+ only)

On Android 12+, you can provide an App set ID to have it used in Qonversion integrations.

Add com.google.android.gms:play-services-appset as the dependency to your project and write the following code.

final AppSetIdClient client = AppSet.getClient(context);
final Task<AppSetIdInfo> task = client.getAppSetIdInfo();
task.addOnSuccessListener(info -> {
    final String id = info.getId();
    Qonversion.setProperty(QUserProperties.AppSetId, id);
});
val client = AppSet.getClient(requireContext())
client.appSetIdInfo.addOnSuccessListener { info: AppSetIdInfo ->
    Qonversion.setProperty(QUserProperties.AppSetId, info.id)
}
Qonversion.setProperty(QUserProperty.appSetId, appSetId);
Qonversion.setProperty(Property.APP_SET_ID, appSetId);
Qonversion.SetProperty(UserProperty.AppSetId, appSetId);

What’s Next