---
id: "getting-started/installation/vega"
title: "Vega OS"
description: "This tutorial shows you how to install the RevenueCat SDK in your Vega OS app to sell in-app purchases through the Amazon Appstore. By the end, you'll have the SDK added to your project, verified with a successful build, and be ready to configure the SDK."
permalink: "/docs/getting-started/installation/vega"
slug: "vega"
version: "current"
original_source: "docs/getting-started/installation/vega.mdx"
---

> **AI agents:** This is the Markdown version of a RevenueCat documentation page. For the complete documentation index, see [llms.txt](https://www.revenuecat.com/docs/llms.txt).

This tutorial shows you how to install the RevenueCat SDK in your Vega OS app to sell in-app purchases through the Amazon Appstore. By the end, you'll have the SDK added to your project, verified with a successful build, and be ready to [configure the SDK](https://www.revenuecat.com/docs/getting-started/configuring-sdk).

:::info[Public beta]

Support for the Amazon Appstore on Vega OS is in public beta. The SDK's APIs may change without warning before general availability.

:::

## Prerequisites

You need the following before you start:

- A [RevenueCat account](https://app.revenuecat.com/).
- A [project](https://www.revenuecat.com/docs/projects/overview) in your RevenueCat account with an [Amazon Appstore app](https://www.revenuecat.com/docs/projects/connect-a-store#amazon-appstore) configured.
- A Vega OS app project.

## 1. Install the SDK

[![Release](https://img.shields.io/npm/v/@revenuecat/purchases-js-vega.svg?style=flat)](https://www.npmjs.com/package/@revenuecat/purchases-js-vega)

Add the `@revenuecat/purchases-js-vega` package to your project:

**Installation**

```shell
npm install --save @revenuecat/purchases-js-vega
```

Vega OS provides the following libraries at runtime, but your app still needs to list them as dependencies:

**Installation**

```shell
npm install --save \
  @amazon-devices/kepler-compatibility@~1.0.5 \
  @amazon-devices/kepler-file-system@~0.0.7 \
  @amazon-devices/keplerscript-appstore-iap-lib@~2.13.0
```

:::info[Use `~` version ranges]

Amazon [recommends using `~` version ranges](https://community.amazondeveloper.com/t/package-json-semver-guidance-for-amazon-distributed-libraries-on-vega/11643) for `@amazon-devices` libraries, since a new minor version of one of these libraries can raise your app's minimum Vega OS version, even if you don't use its new APIs. Using the `~` limits your app to using that minor version until you're ready to upgrade.

:::

## 2. Import the SDK

Import `Purchases` from the `@revenuecat/purchases-js-vega` package:

**Vega**

```ts
import { Purchases } from "@revenuecat/purchases-js-vega";
```

Use this package instead of `@revenuecat/purchases-js` in your Vega app.

## 3. Add in-app purchase permissions

Your app needs access to the Amazon Appstore's in-app purchasing services. Add the following to your app's `manifest.toml`:

**manifest.toml**

```
[wants]
[[wants.service]]
id = "com.amazon.iap.core.service"

[[wants.module]]
id = "/com.amazon.iap.core@IIAPCoreUI"

[needs]
[[needs.module]]
id = "/com.amazon.kepler.appstore.iap.purchase.core@IAppstoreIAPPurchaseCoreService"
```

Without these entries, the SDK cannot load products or make purchases.

## Configure the SDK

Configure the SDK with your RevenueCat public API key for your Amazon app, which starts with `amzn_`. Find it in the RevenueCat dashboard under **Project > API keys > SDK API keys**.

**Vega**

```ts
const appUserId = authentication.getAppUserId(); // Replace with your own authentication system
const purchases = Purchases.configure({
    apiKey: AMAZON_API_KEY,
    appUserId: appUserId,
});
```

## Next steps

You've installed the RevenueCat SDK and verified your project builds.

- [Set up your Amazon Appstore products](https://www.revenuecat.com/docs/getting-started/entitlements/amazon-product-setup) if you haven't already.
- [Display products](https://www.revenuecat.com/docs/getting-started/displaying-products) and [make purchases](https://www.revenuecat.com/docs/getting-started/making-purchases).
- [Test purchases on Vega](https://www.revenuecat.com/docs/test-and-launch/sandbox/amazon-store-sandbox-testing#vega-os) with DevTest and Live App Testing.
