SDK setup
The In-App Shopping SDK is currently available for Android. An iOS SDK is on the roadmap; this page will gain an iOS tab when it ships.
Get the SDK
The SDK is published as a Maven package. Add the Open Fabric repository to your project's Gradle settings, then declare the dependency:
- Android
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/open-fabric/slice-in-app-shopping-sdk-android")
credentials {
username = "<value provided by Open Fabric>"
password = "<value provided by Open Fabric>"
}
}
}
}
dependencies {
implementation("co.openfabric:of-in-app-shopping-sdk:<latest version>")
}
Open Fabric provides a separate SDK for the Sandbox and Production environments. Use the one matching the environment your backend credentials belong to. See Environments.
Requirements
- Minimum SDK version: Android 6.0 Marshmallow (API level 23)
- Permissions:
android.permission.INTERNET - A
WebViewin your app to host the merchant site — the SDK enables JavaScript and configures the WebView when you attach it.
Initialize the SDK
Initialize once at application start, before attaching any WebView:
class App : Application() {
override fun onCreate() {
super.onCreate()
OfInAppShoppingSdk.init(
application = this,
config = SdkConfig(
debug = false, // must be false in production builds
tenantName = "YourBrand",
tenantLogoUrl = "https://cdn.your-company.com/logo.png",
),
)
}
}
SdkConfig property | Description |
|---|---|
debug | When true, card fields are not hidden during automation (useful while developing). Must remain false in production builds. |
tenantName | Your display name. The SDK injects no in-page UI — use this to brand your own payment hint or approval overlay. |
tenantLogoUrl | Optional HTTPS logo URL for your own payment UI. |
Sample app
Open Fabric provides a complete reference integration — merchant list, WebView screen, mock backend, approval overlay, and payment flow — that demonstrates every callback and API call described in the following pages. Contact your Open Fabric representative to get access during onboarding.
Next: Create a shopping session.