Skip to main content

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:

// 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

MethodDescription
startInitializes IAPHUB, a prerequisite for using other SDK methods.
stopStops the IAPHUB billing system.
loginAuthenticates the user with IAPHUB.
logoutDeauthenticates the user with IAPHUB.
getUserIdReturns the user ID.
setUserTagsUpdates the user's tags.
setDeviceParamsConfigures device parameters.
getProductsRetrieves available and active products.
getProductsForSaleRetrieves products ready for purchase.
getActiveProductsRetrieves user-owned subscriptions or non-consumables.
getBillingStatusProvides insights into the billing system's current status.
buyTriggers the purchase of a product.
restoreResynchronizes purchased transactions from the user's store account (Apple/Google Play).
showManageSubscriptionsDisplays a page for users to manage their active subscriptions.
presentCodeRedemptionSheetDisplays a modal for users to redeem promo codes configured in App Store Connect.
addEventListenerEnables listening to events triggered by the IAPHUB SDK.
removeEventListenerStops listening for a specific event.
removeAllListenersRemoves all registered event listeners.