> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Subscription Management Mode

> This guide is for implementing subscription-based access management with Qonversion (Subscription Management mode).

The Subscription Management mode allows you to implement a complete 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](integrations-overview#tracked-events) in integrations, please refer to the [Analytics Mode guide](analytics-mode).

## 1. Configure Products & Entitlements

To successfully run subscription-based entitlement management, you need to connect stores' products to Qonversion:

1. Create and configure in-app products on the [App Store Connect](https://qonversion.io/blog/configure-iap-app-store-connect/) and/or [Google Play Console](android-in-app-products) sides

   * Please note that your *App Store Connect* products must be in either *Ready to submit* or *Ready for sale* statuses. Otherwise, the [*Product not found error*](troubleshooting#product-not-found-error) may occur during Qonversion SDK integration.
   * Do not forget to activate your products for the Google Play console. Otherwise, the [*SkuDetails error*](troubleshooting#skudetails-error) may occur during Qonversion SDK integration.

2. [Create entitlement](https://dash.qonversion.io/entitlements) which should be granted once in-app product is purchased. Learn more about Qonversion entitlements [here](entitlements).

3. [Create product-linker](https://dash.qonversion.io/entitlements/products) in Qonversion and link it to the previously created entitlement. Learn more about Qonversion products [here](create-products).

<Info>
  Selling on the web too? You can map web-billing products into the same entitlements. Connect [Stripe](stripe-integration) or [Paddle](paddle-integration) and add their product IDs to your Qonversion products so cross-platform subscribers get the same access.
</Info>

## 2. Configure Offerings

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

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

Learn more about [Qonversion offerings here](/docs/offerings).

## 3. Launch SDK

Initialize the SDK:

<CodeGroup>
  ```swift Swift theme={null}
  import Qonversion

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
      let config = Qonversion.Configuration(projectKey: "projectKey", launchMode: .subscriptionManagement)
      Qonversion.initWithConfig(config)
    	return true
  }
  ```

  ```objectivec Objective-C theme={null}
  #import "Qonversion.h"

  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      QONConfiguration *configuration = [[QONConfiguration alloc] initWithProjectKey:@"projectKey" launchMode:QONLaunchModeSubscriptionManagement];
      [Qonversion initWithConfig:configuration];

      return YES;
  }
  ```

  ```java Java theme={null}
  import com.qonversion.android.sdk.Qonversion;
  import com.qonversion.android.sdk.QonversionConfig;
  import com.qonversion.android.sdk.dto.QLaunchMode;

  public class App extends Application {
      @Override
      public void onCreate() {
          super.onCreate();
          final QonversionConfig qonversionConfig = new QonversionConfig.Builder(
                  this,
                  "projectKey",
                  QLaunchMode.SubscriptionManagement
          ).build();
          Qonversion.initialize(qonversionConfig);
      }
  }
  ```

  ```kotlin Kotlin theme={null}
  import com.qonversion.android.sdk.Qonversion
  import com.qonversion.android.sdk.QonversionConfig
  import com.qonversion.android.sdk.dto.QLaunchMode

  public class App : Application {
      override fun onCreate() {
          super.onCreate()
          val qonversionConfig = QonversionConfig.Builder(
              this,
              "projectKey",
              QLaunchMode.SubscriptionManagement
          ).build()
          Qonversion.initialize(qonversionConfig)
      }
  }
  ```

  ```dart Flutter theme={null}
  import 'package:qonversion_flutter/qonversion_flutter.dart';

  final config = new QonversionConfigBuilder(
    'projectKey',
    QLaunchMode.subscriptionManagement
  ).build();
  Qonversion.initialize(config);
  ```

  ```typescript React Native theme={null}
  import Qonversion, {
    QonversionConfigBuilder,
    LaunchMode,
  } from '@qonversion/react-native-sdk';

  const config = new QonversionConfigBuilder(
    'projectKey',
    LaunchMode.SUBSCRIPTION_MANAGEMENT
  ).build();
  Qonversion.initialize(config);
  ```

  ```csharp Unity theme={null}
  using QonversionUnity;

  private void Start()
  {
      QonversionConfig config = new QonversionConfigBuilder(
              "projectKey",
              LaunchMode.SubscriptionManagement
          ).Build();
      Qonversion.Initialize(config);
  }
  ```

  ```typescript Cordova theme={null}
  const config = new Qonversion.ConfigBuilder(
    'projectKey',
    Qonversion.LaunchMode.SUBSCRIPTION_MANAGEMENT,
  ).build();
  Qonversion.initialize(config);
  ```

  ```typescript Capacitor theme={null}
  import Qonversion, {
    QonversionConfigBuilder,
    LaunchMode,
  } from '@qonversion/capacitor-plugin';

  const config = new QonversionConfigBuilder(
    'projectKey',
    LaunchMode.SUBSCRIPTION_MANAGEMENT
  ).build();
  Qonversion.initialize(config);
  ```
</CodeGroup>

**→[Get your Qonversion Project Key](quickstart#2-create-a-project-and-register-your-app)**

## 4. Set additional user attributes

Optionally, to improve attribution in Adjust, AppsFlyer, Singular, or to match Qonversion revenue events to users in [third-party tools](integrations-overview), you can share with us such attributes as User Identifier, IDFA (Identifier for Advertisers, iOS 14.5+ only) or ASID (App set ID, Android 12+ only). Please follow [this guide](user-properties#custom-user-properties) to learn more.

## 5. Get offerings, make purchases, and check the premium status

Once you have added Products, Entitlements, and Offerings to Qonversion, initialized the SDK, and added user attributes, it's time to proceed to the main part of the Subscription Management implementation!

1. [Here](displaying-products#displaying-products) you'll learn how to correctly display products to your customer using Qonversion SDK's *offering* method.
2. By following [this guide](making-purchases), you will know how to launch a purchase, after which your user gets premium access with the entitlement you have created above.
3. Finally, [this article](check-permissions) will help you check whether your user has already been granted access to your premium features.

***

What’s Next

* [Displaying Products](displaying-products)
* [Making Purchases](making-purchases)
* [Subscription Status](check-permissions)
