SDK Reference
React native
Flutter
Swift
Kotlin
Install SDK
Make sure to integrate the IAPHUB SDK into your app. Our SDKs are all open source and easily accessible on GitHub:
- iOS SDK (Swift/Objective-C) (https://github.com/iaphub/iaphub-ios-sdk)
- Android (Kotlin/Java) (https://github.com/iaphub/iaphub-android-sdk)
- React Native SDK (https://github.com/iaphub/react-native-iaphub)
- Flutter SDK (https://github.com/iaphub/flutter-iaphub)
// Install react-native-iaphub
npm install react-native-iaphub --save
// Update dependency on xcode (in the ios folder)
pod install
React Native
Flutter
Swift
Kotlin
Methods
| Method | Description | 
|---|---|
| start | Initializes IAPHUB, a prerequisite for using other SDK methods. | 
| stop | Stops the IAPHUB billing system. | 
| login | Authenticates the user with IAPHUB. | 
| logout | Deauthenticates the user with IAPHUB. | 
| getUserId | Returns the user ID. | 
| setUserTags | Updates the user's tags. | 
| setDeviceParams | Configures device parameters. | 
| getProducts | Retrieves available and active products. | 
| getProductsForSale | Retrieves products ready for purchase. | 
| getActiveProducts | Retrieves user-owned subscriptions or non-consumables. | 
| getBillingStatus | Provides insights into the billing system's current status. | 
| buy | Triggers the purchase of a product. | 
| restore | Resynchronizes purchased transactions from the user's store account (Apple/Google Play). | 
| showManageSubscriptions | Displays a page for users to manage their active subscriptions. | 
| presentCodeRedemptionSheet | Displays a modal for users to redeem promo codes configured in App Store Connect. | 
| addEventListener | Enables listening to events triggered by the IAPHUB SDK. | 
| removeEventListener | Stops listening for a specific event. | 
| removeAllListeners | Removes all registered event listeners. |