SDK

Kotlin Multiplatform in-app purchases with the RevenueDot SDK

To add in-app purchases to a Kotlin Multiplatform app, add app.revenuedot.purchases:purchases-kmp-core:3.10.1 to commonMain and call Purchases.configure in common code, with the appl_ key on iOS and the goog_ key on Android. RevenueDot checks each purchase with the App Store or Google Play and keeps each customer's access in sync. RevenueDot Cloud is free until your app makes $10,000 a month.

Free until your app makes $10,000 a month. Switching from RevenueCat? Change one line.

Common code

One Purchases.configure call in commonMain covers the Android and iOS targets.

Maven Central

purchases-kmp-core 3.10.1, plus purchases-kmp-ui for paywalls.

Built on the native SDKs

Its Android side is RevenueDot's Android SDK 10.22.1, and its iOS side compiles RevenueDot's iOS SDK 5.90.2.

Test Store first

Buy with a test_ key in a debug build before you have App Store or Google Play accounts.

Steps

How to add subscriptions to a Kotlin Multiplatform app with RevenueDot

  1. 01

    Create a free Cloud project

    Start for free on RevenueDot Cloud and add an App Store app and a Google Play app, or a Test Store app for a first run.

  2. 02

    Connect the stores and create the catalog

    Add credentials (App Store, Google Play), then products, an entitlement such as pro (the access your app checks) and a current offering (the products your paywall shows).

  3. 03

    Install the RevenueDot SDK and configure it with your key

    Add the Gradle dependency to commonMain, then call Purchases.configure in common code, as in the code below. On Cloud the SDK already points at RevenueDot, so your key is the only setting.

  4. 04

    Pass the right key per platform

    Pass the appl_ key on iOS and the goog_ key on Android to PurchasesConfiguration.

  5. 05

    Buy and check the entitlement

    Call awaitPurchase(pkg) and read customerInfo.entitlements.active. It throws PurchasesTransactionException on failure or cancel. See the Test Store to buy without store accounts.

Install

Install the RevenueDot Kotlin Multiplatform SDK and configure it with your key

The RevenueDot SDK is built from RevenueCat's open-source SDK (MIT license), so your code imports com.revenuecat.purchases.kmp and calls Purchases. It sends every request to RevenueDot and needs no RevenueCat account.

Self-hosting? Set Purchases.proxyURL, a String, to your server before configure, and keep the default verification mode, DISABLED, because your server signs with its own key. See Trusted Entitlements.

Install, then configure in common codeGradle and Kotlin
// build.gradle.kts, commonMain
implementation("app.revenuedot.purchases:purchases-kmp-core:3.10.1")
implementation("app.revenuedot.purchases:purchases-kmp-ui:3.10.1")   // only for paywalls

// Common code, once at app start
import com.revenuecat.purchases.kmp.Purchases
import com.revenuecat.purchases.kmp.PurchasesConfiguration

fun initPurchases(apiKey: String) {   // the appl_ key on iOS, the goog_ key on Android
    Purchases.configure(PurchasesConfiguration(apiKey))
}

Kotlin

Check the entitlement, then buy a package

The await helpers live in com.revenuecat.purchases.kmp.ktx.

Check access and buyKotlin
val customerInfo = Purchases.sharedInstance.awaitCustomerInfo()
val isPro = customerInfo.entitlements.active.containsKey("pro")

val offerings = Purchases.sharedInstance.awaitOfferings()
val pkg = offerings.current?.availablePackages?.firstOrNull() ?: return
val result = Purchases.sharedInstance.awaitPurchase(pkg)
val nowPro = result.customerInfo.entitlements.active.containsKey("pro")

Notes

Check these Kotlin Multiplatform details before you ship

  • Test Store keys work in debug builds only. Ship with appl_ and goog_ keys.
  • Self-hosted servers older than the 2026-09-30 fix could not serve Test Store products to the native iOS SDK, so update your server.
  • Status: there is no Kotlin Multiplatform example app yet. The calls match the Android SDK page.

Switch

Switching from RevenueCat? Keep purchases-kmp and change one line

If your app already ships RevenueCat's purchases-kmp, you can keep it. Set Purchases.proxyURL in common code before configure. Verification is already DISABLED by default. Then call awaitSyncPurchases() once from a coroutine on the first launch of the update, so current subscribers keep access. The full plan is in Migrate from RevenueCat.

  • A String: in purchases-kmp the proxy URL is a String, not a URL as in the native Android SDK.
  • Android diagnostics: the stock Android SDK underneath still sends diagnostics, paywall events and ad events to RevenueCat. The RevenueDot SDK sends them to RevenueDot.
  • Verification: never use ENFORCED with the stock SDK. RevenueDot cannot sign with RevenueCat's key, so every request would fail.
Point the RevenueCat SDK at RevenueDotKotlin
Purchases.proxyURL = "https://api.revenuedot.app"

fun initPurchases(apiKey: String) {
    Purchases.configure(PurchasesConfiguration(apiKey) {
        // DISABLED is the KMP default; keep it.
        verificationMode = EntitlementVerificationMode.DISABLED
    })
}

// Once, from a coroutine, on the first launch of this update
Purchases.sharedInstance.awaitSyncPurchases()

FAQ

Kotlin Multiplatform: questions people ask

Do I need a RevenueCat account to use the RevenueDot Kotlin Multiplatform SDK?

No. The RevenueDot SDK is built from RevenueCat's open-source purchases-kmp under the MIT license, but every request goes to RevenueDot. Create a free RevenueDot Cloud project, copy your app's keys and pass them to PurchasesConfiguration.

How do I add in-app purchases to a Kotlin Multiplatform app?

Add purchases-kmp-core from Maven Central to commonMain, configure it with a store key per platform, fetch offerings and call awaitPurchase. RevenueDot checks each purchase with the App Store or Google Play and keeps the customer's entitlements in sync.

Does RevenueDot work on both iOS and Android targets in KMP?

Yes. One configure call in common code covers both targets. Pass the appl_ key on iOS and the goog_ key on Android. The SDK builds on RevenueDot's native Android and iOS SDKs.

Do I need to change entitlement verification in KMP?

No. purchases-kmp already defaults to EntitlementVerificationMode.DISABLED, which works with RevenueDot Cloud and a self-hosted server.

Is the proxy URL a String or a URL in purchases-kmp?

A String. In the native Android SDK it is a java.net.URL, but purchases-kmp takes a plain String, so a switcher writes Purchases.proxyURL = "https://api.revenuedot.app".

Get started

Start selling subscriptions in your app today.

Building and testing are free, and you can test your first purchase before you have a store account. Pro costs $0 until your apps make $10,000 a month.

Already have an account? Sign in · Switching from RevenueCat? Change one line