Skip to main content
Skip to navigation

Vega OS

Instructions for installing the RevenueCat SDK for the Amazon Appstore on Vega OS

AIAsk AIChatGPTClaude

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.

📘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:

1. Install the SDK​

Release

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

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:

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

Amazon recommends using ~ version ranges 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:

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:

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

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.

Was this page helpful?