> ## 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.

# Unity SDK 7.x to 8.x migration guide

> We've upgraded the Google Play Billing Library dependency for Android to version 7 in this release, leading to several changes in our SDK. These are described below.

## Upgrading version

Increase the dependency version in your *Packages/manifest.json* file to upgrade your Qonversion SDK to the latest

<CodeGroup>
  ```json manifest.json theme={null}
  "com.qonversion.unity": "https://github.com/qonversion/unity-sdk.git#8.0.0"
  ```
</CodeGroup>

## Android deployment upgrades

With the new Google Play Billing Library 7 we've increased our `minSdkVersion` to 21 and `targetSdkVersion` to 34 for Android.

If you were using lower `minSdkVersion` you should upgrade it to 21 to use the latest version of our SDK and Google Play Billing Library. If you have already targeted the 21+ version, you should do nothing.

## Installment plans support

In the latest library version, Google introduces installment plans, when a customer commits to pay for several subsequent subscription periods. In our release, we've added a new field `InstallmentPlanDetails` to `ProductOfferDetails` with the details of the installment plan if they exist. It contains the following information:

| Field                               | Type | Description                                                               |
| ----------------------------------- | ---- | ------------------------------------------------------------------------- |
| `CommitmentPaymentsCount`           | Int  | Committed payments count after a user signs up for this subscription plan |
| `SubsequentCommitmentPaymentsCount` | Int  | Subsequent committed payments count after this subscription plan renews   |

We've also added an `IsInstallment` flag to `ProductStoreDetails` to check if the current product has an installment plan or not.

Below is an example of those fields usage:

<CodeGroup>
  ```csharp Unity theme={null}
  Qonversion.GetSharedInstance().Products((products, error) => {
    var installmentProduct = products["android_installment"];
    var storeDetails = installmentProduct?.StoreDetails;
    if (storeDetails?.IsInstallment == true) {
      var installmentPlanDetails = storeDetails.BasePlanSubscriptionOfferDetails?.InstallmentPlanDetails;
      // Use the installment plan information
    }
  });
  ```
</CodeGroup>

## Fallback files

We're happy to introduce the fallback files support in this release to make our system reliability even higher. Fallback files allow your app to work as expected in rare cases of network connection or Qonversion API issues for new users without a cache available. This allows purchases and entitlements to be processed for new users even if the Qonversion API faces issues. This also makes it possible to receive remote configs for cases when the network connection is unavailable.

Fallback files are available both on iOS and Android.

Read more about the fallback files in [the documentation](system-reliability#fallback-files).

## Error codes

In this release, we have added the `QonversionErrorCode` enum with the list of defined Qonversion error codes. Now you can compare any error code with the defined one to check any specific case as follows:

<CodeGroup>
  ```csharp Unity theme={null}
  Qonversion.GetSharedInstance().Purchase(
    ...,
    (entitlements, qonversionError, cancelled) => {
      if (qonversionError.Code == QErrorCode.StoreProductNotAvailable) {
        // The requested product is unavailable for purchase. 
      }
    });
  ```
</CodeGroup>

We've also changed the type of `QonversionError.Code` field from `string` to `QErrorCode`.

## The other changes

* Pending purchases support was added for prepaid subscriptions on Android.
* `EligibilityStatus` `NonIntroProduct` was renamed to `NonIntroOrTrialProduct` to better reflect the meaning.

***

[React Native SDK 7.x to 8.x migration guide](react-native-8-migration-guide)

[Cordova SDK 5.x to 6.x migration guide](cordova-6-migration-guide)
