Skip to main content
Get the product using its ID from the Qonversion Dashboard.
const products = await Qonversion.getSharedInstance().products();
const product = products.get("your_product_id");
Then initiate the purchase where needed in your app.
const result = await Qonversion.getSharedInstance().purchaseWithResult(product);

if (result.isSuccess) {
  const premium = result.entitlements?.get('premium');
  if (premium && premium.isActive) {
    // Grant user access to premium features
  }
} else if (result.isCanceled) {
  // Handle canceled purchase
} else if (result.isPending) {
  // Handle pending purchase
} else {
  // Handle errors
}