Use this page with AI
Copy this into your coding assistant and add your request.
Read https://openiap.dev/docs/setup/store and https://openiap.dev/llms.txt. Follow the reading instructions, detailed reference, and linked guides relevant to my task before making changes.
Inspect my existing project and reuse its framework and conventions. Ask me for missing product decisions. Implement the requested behavior and run the applicable checks.
Show the working result, the commands and actual test results, and any remaining limitations. Keep your explanation brief.
My request: [describe what customers should be able to do]Store Setup
Apple App Store and Google Play need no extra store configuration — your framework setup guide covers them. This section is for additional store targets: Meta Quest (Horizon OS), the Amazon Appstore (Fire OS and Vega OS), and the Onside iOS alternative marketplace. Finish your framework setup first, then add the store target your release artifact needs. The purchase APIs stay identical on every store; only build-time and runtime store selection differ. Each store guide lists the exact values you need, where to get them, and where each framework reads them.
How the Store Is Selected#
Keep every store credential in the project — the Horizon app id and the Amazon AppstoreAuthenticationKey.pem are inert on the other stores — and let the build pick the store. The Gradle wrappers (React Native, Expo, and Flutter) apply the whole rule, first match wins, and so does the OpenIAP Gradle plugin in native Android and KMP apps. A Godot export applies it with the openiap/android_store export option as the explicit step and no Variant step, and a MAUI build the same way with the OpenIapStore MSBuild property:
- Explicit —
openiapStore=play|horizon|amazonas a Gradle property:-PopeniapStore=horizon,ORG_GRADLE_PROJECT_openiapStore=horizonin an EAS profile, orgradle.properties.fireOsEnabled=truedeclares a Fire OS build asopeniapStore=amazondoes.automeans no pin. The legacyhorizonEnabledstill pins with a deprecation warning and is removed in the next major release. Onlyflutter_inapp_purchaseacceptsopeniapStore=none(or the legacyopeniapPlatform=none) to build without a store SDK. - Variant — the requested task names a store flavor:
assembleHorizonRelease,installAmazonDebug, orflutter build apk --flavor amazonin a Flutter app that declares those flavors. Only a spelled-out task name is read: once the task graph is ready, an abbreviation such asaHR, a lower-cased name or a prefix that builds another store stops the build instead of shipping the wrong SDK. Name one store per invocation, and name itplay,horizonoramazon— the aliases work inopeniapStore, not in a flavor name. An anchor task such asassembleDebugorbundleReleaseis not a second store, and it does not give each flavor its own: the build links the one store this rule chose into every flavor the anchor produces. To ship a different store per flavor, name one flavor — or one pin — per invocation. - Device — debug builds only (a Godot debug export, a MAUI Debug build): the adb device
ANDROID_SERIALnames (for MAUI, the IDE'sAdbTargetfirst), or the single attached one, is a Quest or a Fire device. Release builds never look at a device, and several attached devices select nothing unlessANDROID_SERIALpicks one. The device pickers influtter run -d,expo run:android --device, andreact-native run-android --deviceIdare not passed to Gradle, so exportANDROID_SERIALyourself when several devices are attached. - Play otherwise.
The decision is logged once per build as openiap: store=horizon (source=device; ...), at Gradle's quiet level, so -q runs show it too. A store pin against a different task flavor, two flavors in one invocation, and a pin against a store flag or openiapPlatform=none each fail the build, so a pinned release train cannot quietly ship the wrong billing SDK. The device is a fallback rather than a competing signal: a pin or a flavor simply outranks it. The device step also works with the configuration cache: plugging in a different device reconfigures the build. The aliases google/gplay/googleplay/google-play/gms, meta/quest, and fire/fireos/fire-os normalize to the three store ids.
Native Android and KMP apps get the rule from the OpenIAP Gradle plugin, applied once in settings.gradle.kts with mavenCentral() in the pluginManagement repositories. Depend on openiap-google with a version of its own, not one only a BOM or constraint supplies; the plugin links the chosen store's build in its place, and a store artifact declared directly must name the same store or the build stops. A module that declares its own platform flavors keeps them: kmp-iap matches each flavor, and one openiap-google dependency links each flavor's store.
// settings.gradle.kts — keep mavenCentral() in pluginManagement.repositories
plugins {
id("io.github.hyochan.openiap") version "3.6.3"
}Store Targets#
| Target | How it is selected | Setup guide |
|---|---|---|
| Horizon OS | Resolved at build time: an openiapStore=horizon pin, a horizon flavor, or a connected Quest on a debug build. | Horizon OS Setup |
| Amazon Fire OS | Resolved at build time: an openiapStore=amazon pin, an amazon flavor, or a connected Fire device on a debug build. | Amazon Store Setup — Fire OS |
| Amazon Vega OS | Vega devices run apps on Amazon's Kepler JavaScript runtime instead of Android; react-native-iap and expo-iap switch to their Kepler adapter at runtime. | Amazon Store Setup — Vega OS |
| Onside | iOS alternative marketplace; expo-iap selects the Onside runtime automatically (Expo only). | Onside Setup |
Framework Model#
Every store guide shows two setup paths, so know which one your project uses. Expo projects declare store values in the Expo config, and a config plugin writes the native files during expo prebuild. Bare React Native, Flutter, KMP, MAUI, Godot, and native Android projects edit their native build files directly.
- Fire OS and Vega OS are separate release artifacts even though both use Amazon receipt verification — do not reuse one build for the other.
- Onside is currently
expo-iaponly; other frameworks have no Onside build option.