In-App Purchase package
Updated: Dec 3, 2025
The
Platform SDK In-App Purchase Package enables app monetization through in-app purchases, including consumables, durable items, and subscriptions. The package retrieves product information and pricing, initiates the purchase flow for items, and queries user purchase history.
Applications can mark consumable items as used after consumption. Both durable (permanent) and consumable (one-time use) items are supported, along with subscription management. This package is essential for free-to-play and premium content monetization strategies.
Add the following to your project’s ./gradle/libs.versions.toml file:
[libraries]
// Existing lines
iap-kotlin = { module = "com.meta.horizon.platform.sdk:iap-kotlin", version.ref = "horizonPlatformSdk" }
dependencies {
// Existing lines
implementation(libs.iap.kotlin)
}
In Android Studio, click File > Sync Project with Gradle Files to install the package.
Click Build > Generate App Bundles or APKs > Generate APKs.
In the “External Libraries” section of your project, confirm that these packages are listed.
com.meta.horizon.platform.sdk:core-kotlin
com.meta.horizon.platform.sdk:iap-kotlin
Now you can initialize the Platform SDK and use In-App Purchase package functions in your app.