Skip to main content

One post tagged with "billing"

View All Tags

ยท 2 min read
Hyo

kmp-iap Initial Release ๐ŸŽ‰โ€‹

We're excited to announce the first release of kmp-iap, a unified in-app purchase library for Kotlin Multiplatform!

Key Featuresโ€‹

๐ŸŽ iOS - Full StoreKit 2 Supportโ€‹

  • Complete support for Apple's latest StoreKit 2 framework
  • Enhanced purchase verification and transaction management
  • Improved subscription status tracking
  • Leverages modern Swift async/await patterns

๐Ÿค– Android - Google Play Billing Library 7.1.1 Supportโ€‹

Supporting Google Play Billing Library 7.1.1 with comprehensive features:

  • Product Details API: Modern API for querying product information
  • Subscription offers: Support for multiple subscription offers and pricing phases
  • Pending purchases: Full support for pending transactions
  • Error handling: Detailed error codes and debugging information
  • Purchase verification: Secure purchase token verification

๐ŸŽฏ Unified APIโ€‹

  • Same API for in-app purchases on both iOS and Android
  • Reactive programming with Kotlin Coroutines and Flow
  • Type-safe Kotlin native implementation

Getting Startedโ€‹

// Initialize
KmpIAP.initConnection()

// Load products
val products = KmpIAP.requestProducts(
ProductRequest(
skus = listOf("product_id"),
type = ProductType.INAPP
)
)

// Request purchase
KmpIAP.requestPurchase(
UnifiedPurchaseRequest(
sku = "product_id",
quantity = 1
)
)

// Observe purchase state
KmpIAP.purchaseUpdatedListener.collect { purchase ->
// Handle purchase
}

Next Stepsโ€‹

We'll continue to improve the library and add new features. Your feedback and contributions are welcome!

GitHub: https://github.com/hyochan/kmp-iap