Introduction
Why OpenIAP
Stop translating purchasesOne generated, type-safe contract keeps every store and framework SDK aligned.
01 / The problem
The rewrite tax
- 01
APIs diverge
Methods, types, and events change with every store and SDK.
- 02
Fixes repeat
Maintainers solve the same lifecycle and error cases in parallel.
- 03
Platforms drift
StoreKit and Play Billing updates reach each framework differently.
02 / The contract
One source, many targets
Change the contract once. Generate the same shape for every language, then implement it against the native stores.
- SourceGraphQL schemaOne contract
- GenerateNative typesSwift · Kotlin · TS · Dart · C# · GDScript
- ImplementStore modulesStoreKit 2 · Play Billing
- ShipFramework SDKsOne API in every runtime
03 / The API
A small surface on purpose
Methods
Start and complete the purchase lifecycle
Types
Share one model without hiding native fields
Events
React to state changes with predictable signals
04 / Generated types
Same model, native language
Each target gets idiomatic generated types while the field model stays aligned across the ecosystem.
func displayLabel(for product: Product) -> String {
switch product {
case let .productIos(ios):
return ios.title + " " + ios.displayNameIOS
case let .productAndroid(android):
return android.title + " " + android.nameAndroid
}
}05 / Runtime
The purchase loop
The same lifecycle travels from connection through server-side validation to a finished transaction.
- 01Connect
initConnection() - 02Listen
purchaseUpdatedListener - 03Fetch
fetchProducts() - 04Purchase
requestPurchase() - 05Validate
verifyPurchaseWithProvider() - 06Finish
finishTransaction()
06 / Reach
Where it ships
Native store depth below, framework choice above.
One more thing
Meet IAPKit
The backend for every purchase
One backend validates purchases from Apple StoreKit 2, Google Play, Meta Horizon, Amazon Fire OS, and Vega OS, then returns one normalized result.



