[Jan 2026] Migration guide. Cordova 7.

In this major release of the Qonversion Cordova Plugin, we've made crucial changes to support No-Codes along with the new purchase method, plugin migration to the Qonversion organization in NPM, and some others.

No-Codes support

Qonversion No-Codes are now officially released! For integration steps, please follow our documentation.

Automation removal

We have switched from the Automations support to the new No-Codes Builder, so all the Automations methods were completely removed. Please, consider migrating to the new No-Codes - they are very simple and much more functional!

Upgrading library

We've migrated the library to the Qonversion organization in NPM, so along with the version update, you should also change the name of the library and all the imports.

In your package.json file, upgrade the name and the version of the Qonversion SDK:

// Before
// "cordova-plugin-qonversion": "^6.0.0"

// Now
"@qonversion/cordova-plugin": "^7.0.0"

New purchase method

We have refactored the purchase method - now it returns comprehensive information, including status, entitlements after the purchase, error information if it happened, and also stores transaction info. After upgrading to this version, rewrite your purchase calls as follows:

try {
  // Old method returned only Map<string, Entitlement>
  const entitlements = await Qonversion.getSharedInstance().purchase(product, purchaseOptions);
  
  // Check for entitlement
  const premiumEntitlement = entitlements.get('premium');
  if (premiumEntitlement?.isActive) {
    console.log('Purchase successful! Premium access granted.');
  }
} catch (error) {
  // All errors, including user cancellation, were handled via catch
  if (error.code === Qonversion.QonversionErrorCode.PURCHASE_CANCELED) {
    console.log('User canceled the purchase');
  } else {
    console.error('Purchase failed:', error.message);
  }
}
const purchaseResult = await Qonversion.getSharedInstance().purchase(product, purchaseOptions);

if (purchaseResult.isSuccess) {
  // Purchase succeeded
  const premiumEntitlement = purchaseResult.entitlements?.get('premium');
  if (premiumEntitlement?.isActive) {
    console.log('Purchase successful! Premium access granted.');
  }
  
  // Access transaction details
  console.log('Transaction ID:', purchaseResult.storeTransaction?.transactionId);
  
} else if (purchaseResult.isCanceled) {
  // User canceled the purchase (not an error)
  console.log('User canceled the purchase');
  
} else if (purchaseResult.isPending) {
  // Purchase is awaiting confirmation (e.g., parental controls)
  console.log('Purchase is pending approval');
  
} else if (purchaseResult.isError) {
  // An error occurred
  console.error('Purchase failed:', purchaseResult.error?.description);
}

If you were using updatePurchase (for Android), migrate as follows:

try {
  // Created a special model for updates
  const purchaseUpdateModel = product.toPurchaseUpdateModel(
    oldProduct, // Current subscription product
    Qonversion.PurchaseUpdatePolicy.WITH_TIME_PRORATION  // Update policy
  );
  
  const entitlements = await Qonversion.getSharedInstance().updatePurchase(purchaseUpdateModel);
  
  const premiumEntitlement = entitlements?.get('premium');
  if (premiumEntitlement?.isActive) {
    console.log('Subscription upgraded successfully!');
  }
} catch (error) {
  if (error.code === Qonversion.QonversionErrorCode.PURCHASE_CANCELED) {
    console.log('User canceled the upgrade');
  } else {
    console.error('Upgrade failed:', error.message);
  }
}
// Use PurchaseOptionsBuilder to specify update parameters
const purchaseOptions = new Qonversion.PurchaseOptionsBuilder()
  .setOldProduct(oldProduct)                              // Current subscription product
  .setUpdatePolicy(Qonversion.PurchaseUpdatePolicy.WITH_TIME_PRORATION)  // Update policy
  .build();

const purchaseResult = await Qonversion.getSharedInstance().purchase(product, purchaseOptions);

if (purchaseResult.isSuccess) {
  console.log('Subscription upgraded successfully!');
  console.log('New transaction ID:', purchaseResult.storeTransaction?.transactionId);
  
  const premiumEntitlement = purchaseResult.entitlements?.get('premium');
  if (premiumEntitlement?.isActive) {
    console.log('Premium access is now active');
  }
  
} else if (purchaseResult.isCanceled) {
  console.log('User canceled the upgrade');
  
} else if (purchaseResult.isPending) {
  console.log('Upgrade is pending');
  
} else if (purchaseResult.isError) {
  console.error('Upgrade failed:', purchaseResult.error?.description);
}

Google Play Billing Library upgrade to version 8

In this version, we've upgraded Google Play Billing Library on Android to version 8.1.0, which results in skuDetails removal from Product and also requires setting up Base Plan ID for all the subscription products in the Qonversion Dashboard, if you haven't set them yet. Read more here.

Properties renamings

We've made a couple of renamings of our DTO properties to sync them with the rest codestyle. If you were using these fields, simply upgrade their names as described in the table below

Old nameNew name
Product.qonversionIDProduct.qonversionId
Product.storeIDProduct.storeId
Product.basePlanIDProduct.basePlanId