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

# Make a Purchase — Cordova

Get the product using its ID from the Qonversion [Dashboard](https://dash.qonversion.io/entitlements/products).

```javascript theme={null}
const products = await Qonversion.getSharedInstance().products();
const product = products.get("your_product_id");
```

Then initiate the purchase where needed in your app.

```javascript theme={null}
const result = await Qonversion.getSharedInstance().purchase(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
}
```
