InAppify

Methods, parameters and defaults

Quick reference for Kotlin, Flutter and JavaScript signatures, required/optional inputs, defaults and platform support.

Baseline: Kotlin/Flutter 0.2.1, JavaScript 0.2.0. These tables select public APIs; consult backend support first. Examples are alternatives, not a startup script executing every operation.

Sessions

KotlinFlutterInputs and output
configure(InappifyOptions(apiKey))configure(apiKey: key) / configureResult(...)Required public key; optional customer ID defaults null; Kotlin Result, Flutter convenience bool
configure(InappifyOptions(apiKey, userId))configure(apiKey: key, appUserIdentifier: id)Existing authenticated account; no market/version context input
logIn(id)logIn(id) / logInResult(id)One ID string, mobile
logOut()logOut() / logOutResult()No inputs
isCustomerAnonymous(identifier)isCustomerAnonymous(appUserIdentifier: identifier)String helper, not session authority

JavaScript InAppify.configure(options) returns a client; client.logIn({identityTicket}) or ({challengeId, code}) authenticates; client.logOut() signs out. Flutter Web uses authenticated startup, ticket exchange or OTP.

Offerings

IntentKotlinFlutterJavaScript
CollectiongetOfferings()getOfferings() / getOfferingsResult()getOfferings()
CurrentgetCurrentOffering()getCurrentOffering() / getCurrentOfferingResult()getCurrentOffering()
PlacementgetCurrentOffering("upgrade")getCurrentOffering(placementIdentifier: 'upgrade') and ResultgetCurrentOffering('upgrade')
Exact IDgetOffering("special_offer")getOffering('special_offer') and ResultgetOffering('special_offer')
Manual refreshsyncAttributesAndOfferingsIfNeeded()Same name, already ResultSame name, Promise

Placement defaults null; mobile has no forceRefresh. Flutter Web does not implement combined sync. Collection helpers current, getOffering(id), getCurrentOfferingForPlacement(id) are network-free. Mobile all is a map; JS all is an array.

CustomerInfo

Mobile client.getCustomerInfo() and InappifySdk.getCustomerInfo() default to cachedOrFetched. Flutter Result takes the same optional fetchPolicy:.

ModeKotlinFlutterJS
Cached or fetchedInappifyCacheFetchPolicy.CACHED_OR_FETCHEDInappifyCacheFetchPolicy.cachedOrFetchedCacheFetchPolicy.CACHED_OR_FETCHED
Cache onlyCACHE_ONLYcacheOnlyCACHE_ONLY
ServerFETCH_CURRENTfetchCurrentFETCH_CURRENT; Web default
Fresh cache or serverNOT_STALE_CACHED_OR_CURRENTnotStaleCachedOrCurrentNOT_STALE_CACHED_OR_CURRENT

Flutter Web doesn't forward the policy. hasEntitlement(id), isActiveEntitlement(id), getEntitlement(id) are synchronous. Mobile has entitlement active/all maps; JS entitlements are an array.

Attributes and discounts

MethodParameters/defaults
Kotlin setAttributes(map) / Flutter setAttributes(map) and Result / JS setAttributes(object)String keys, String/null values; null/empty deletes
setEmail, setDisplayName, setPhoneNumber, setApnsToken, setFcmToken, setIdfa, setIdfv, setCampaign, setKeywordOne String; check write/platform support
Kotlin/Flutter setIp(value)One String; current iOS rejects, Web has no helper
canSetReservedAttribute(key)Exact key such as $email; Flutter has a Result variant
Kotlin setReservedAttribute(request)InappifyReservedAttributeRequest(attribute, value)
Flutter setReservedAttributeResult(attribute:, value:)Required enum/String; empty value deletes
Kotlin getDiscountedPaymentLinks(code)Code only; Result of payment links
Flutter getDiscountedPaymentLinks(code, offeringIdentifier: id) and ResultOptional null identifier; only Web uses it to select
JS validateDiscountCode(code) / (code, offeringId)Current or explicit selection; Promise of priced offering

Purchases, history and delivery

MethodInput and limits
Kotlin purchase(InappifyPurchaseParams.Builder(activity, package).build())Activity for new store UI; Builder(package) for Direct
Flutter purchase(InappifyPurchaseParams(packageToPurchase: package)) and ResultRequired Package; key/paywallId/paywallRevision null; bridge supplies Activity
JS purchase({package}, {redirect: false})Required Package; optional key/code/context; redirect defaults true
Kotlin/Flutter getPurchaseAttempt(id), getPurchaseAttempts()Android only here; null lookup is unknown
Flutter purchaseUpdates / Kotlin addEventListenerCorrelated Android result; release observer with owner
syncStorePurchases()No input; manual Android, Direct-only iOS
restoreStorePurchases()No input; explicit Android restore; no iOS StoreKit
setConsumableDeliveryHandler(handler)Android/direct JS; callback delivered or retryLater
syncPendingConsumables()Native/direct JS, unavailable in Flutter Web
confirmDelivery(deliveryId)After commit; Kotlin Long, Flutter int, JS number
handleDeepLink(url)Native Android recognized payment returns only

Price classification/context come from the Package. Optional paywall fields must be paired. Don't replay uncertain payment with a new key. Purchase and delivery invariants are part of this contract.

Flutter Web-only methods

MethodInputs
configureAuthenticatedWebSessionResult and bool variantRequired apiKey/identityTicketProvider; optional expectedCustomerIdentifier/country/appVersion/cancellation
loginWithIdentityTicketResult or exchangeIdentityTicketResult and nullable variantsRequired identityTicket, optional cancellation; use one exchange per ticket
createOtpCaptchaResult() and nullable variantOptional cancellation
requestOtpResult(phone:, captchaKey:, captchaAnswer:) and nullable variantRequired phone; optional CAPTCHA/cancellation
verifyOtpResult(challengeId:, code:) and nullable variantTwo required strings, optional cancellation
createCheckout(...)Required product/offering/package IDs; discountCode/country/appVersion/key/cancellation null; legacy Web isCrypto=false
getCheckoutStatus(checkoutId:)Required ID, optional cancellation; one query
getPendingCheckoutIdResult() and nullable variantNo inputs
handlePaymentReturnResult(...) and nullable variantcheckoutId null → pending; timeoutMs=60000, intervalMs=1500, optional cancellation

Here isCrypto is a legacy Web checkout option, not mobile purchase input. Copy safe requests from the Web guide.

Advanced mobile controls and observations

Kotlin customerInfo(policy)/offerings(policy) and Flutter customerInfoWithPolicy(policy)/offeringsWithPolicy(policy) take a distinct cacheOnly/cacheFirst/networkFirst/networkOnly enum. Don't conflate it with four semantic CustomerInfo policies. setNetworkEnabled(bool) gates mobile HTTP without deleting paid work. isPaymentUrlAllowed(url) checks Direct destinations. These controls are unsupported on Flutter Web.

Flutter getConfiguration()/getConfigurationResult(), snapshot, events and sessionStateChanges expose observations; do not rewrite ownership with legacy mutable setters. Close Kotlin listener registrations and collect stateUpdates() within UI lifetime.

Cache and recovery defaults · Platform support