Implementieren Sie In-App-Käufe für Kotlin Multiplatform
In-App-Käufe auf iOS und Android mit dem Kotlin Multiplatform (KMP) SDK von Adapty integrieren. Rechnungen verwalten, den Abonnementstatus verfolgen und die Notwendigkeit eines Backends vermeiden. Alle Funktionen in einer einzigen Integration.
Adapty.activate(AdaptyConfig.Builder("YOUR_PUBLIC_SDK_KEY").build())
// Make a purchase, Adapty handles the rest
Adapty.makePurchase(product)
.onSuccess { purchaseResult ->
if (purchaseResult is AdaptyPurchaseResult.Success)
// successful purchase
}
.onError { error ->
// handle the error
}
Du musst kein Backend für Kotlin Multiplatform-In-App-Käufe erstellen
Das SDK von Adapty kümmert sich um alles, was normalerweise auf dem Server läuft: Rechnungsvalidierung, Abonnementstatus, Verlängerungen, Testversionen und Rückerstattungen. Sie verbinden es einfach einmal und erhalten ein funktionierendes Setup für In-App-Käufe in Kotlin Multiplattform.
Demo planenWarum das Adapty SDK wählen?
Verfolge den Abo-Status plattformübergreifend
Du weißt jederzeit, ob der Nutzer ein aktives Abo auf iOS oder Android hat.
Belege im Backend validieren
Du musst keine eigene Validierung aufbauen, da Adapty dies übernimmt.
Alle Abo-Zustände verwalten
Kostenlose Testphasen, Upgrades, Promo-Angebote, Familienfreigabe, Verlängerungen und mehr.
Skaliere auf einer Enterprise-Grade-Basis
Wir veröffentlichen regelmäßig Updates, halten das SDK stabil und arbeiten mit einer SLA von über 99,99 %.
Plattformen konfigurieren
Adapty SDK installieren
await adapty.activate( 'PUBLIC_SDK_KEY', { customerUserId: 'YOUR_USER_ID', });
Kaufereignisse verarbeiten
Einfache Integration für Kotlin Multiplatform
Richte das Adapty SDK in wenigen Stunden ein und beginne mit In-App-Käufen auf iOS und Android. Brauchst du Hilfe? Sieh dir unser vollständiges Kotlin Multiplatform-IAP-Tutorial an.
Nutze 5 SDK-Methoden, um Kotlin Multiplatform-IAPs zu verwalten
import com.adapty.kmp.Adapty
import com.adapty.kmp.models.AdaptyPurchaseResult
Adapty.makePurchase(product = product).onSuccess { purchaseResult ->
when (purchaseResult) {
is AdaptyPurchaseResult.Success -> {
val profile = purchaseResult.profile
if (profile.accessLevels["YOUR_ACCESS_LEVEL"]?.isActive == true) {
// Grant access to the paid features
}
}
is AdaptyPurchaseResult.UserCanceled -> {
// Handle the case where the user canceled the purchase
}
is AdaptyPurchaseResult.Pending -> {
// Handle deferred purchases (e.g., the user will pay offline with cash)
}
}
}.onError { error ->
// Handle the error
}import com.adapty.kmp.Adapty
Adapty.restorePurchases().onSuccess { profile ->
if (profile.accessLevels["YOUR_ACCESS_LEVEL"]?.isActive == true) {
// successful access restore
}
}.onError { error ->
// handle the error
}
import com.adapty.kmp.Adapty
Adapty.identify("YOUR_USER_ID") // Unique for each user
.onSuccess {
// successful identify
}
.onError { error ->
// handle the error
}
import com.adapty.kmp.Adapty
import com.adapty.kmp.models.AdaptyProfile
import com.adapty.kmp.models.AdaptyProfileParameters
val builder = AdaptyProfileParameters.Builder()
.withEmail("[email protected]")
.withPhoneNumber("+18888888888")
.withFirstName("John")
.withLastName("Appleseed")
.withGender(AdaptyProfile.Gender.FEMALE)
.withBirthday(AdaptyProfile.Date(1970, 1, 3))
Adapty.updateProfile(builder.build())
.onSuccess {
// profile updated successfully
}
.onError { error ->
// handle the error
}
import com.adapty.kmp.models.AdaptyProfileParameters
val builder = AdaptyProfileParameters.Builder()
// You can set your own custom attributes:
builder.withCustomAttribute("key1", "value1")
// To remove existing key, use .withRemovedCustomAttribute() method:
builder.withRemovedCustomAttribute("key2")
Adapty unterstützt Apps in jeder Phase – von Indie bis zu Top-Publishern
Alles, was du brauchst, um deine App zu skalieren — bereits im Kotlin Multiplatform SDK enthalten

Steigere Abo-Umsätze ohne App-Releases
Verwalte, segmentiere, lokalisiere und personalisiere Paywalls direkt im Browser.
App-Umsatz steigernRückerstattungen um 40 % senken
Vermeide Umsatzverluste durch Rückerstattungen – Adapty übermittelt automatisch Nutzungsdaten an Apple bei Erstattungsanfragen und reduziert diese.
Refund Saver einrichten

Kenne deine Abo-Zahlen jederzeit
Messe deine In-App-Ökonomie von Testphasen bis Rückerstattungen mit einem einsatzbereiten, Echtzeit-Abo-BI.
Abo-BI ansehenNo-Code-Paywall-Builder
Erstelle wunderschöne native Paywalls für iOS, Android, React Native, Flutter, FlutterFlow, KMP und Capacitor – ganz ohne Dev-Team.
Paywalls in Minuten erstellen







