Skip to main content
Version: v2.0.4 latest

SDK API Reference

Reference tables for the Mobile Payment SDK v2.0.4 — every configuration attribute, enum, method, and exception, with the Kotlin and Swift names side by side. For guided integration steps see the Android, iOS, and Flutter pages.

PaymentSDKConfiguration attributes

Used at initialization and (per value) by the runtime update methods.

AttributeSub-attributeDescription
localizationLocalization settings — replaces the removed v1.x language enums
availableLanguagesLanguages the user can select from the SDK UI (ordered set). English and Arabic are used by default if none are set.
availableLanguages[].codeLanguage alpha-2 code (ISO 639-1): en, ar, ku (Kurdish), … null = follow the system language. Android wraps codes in LanguageCode (from nv-i18n); iOS uses plain strings.
availableLanguages[].nameLanguage name to display in the UI
selectedLanguageCodeUI language to apply. Any ISO 639-1 code; English is used by default.
writingDirectionRIGHT_TO_LEFT / rightToLeft, LEFT_TO_RIGHT / leftToRight, SYSTEM / auto. System direction by default.
themeDARK / dark, LIGHT / light, SYSTEM / auto. System theme by default.
skipResultScreenSkip the SDK's result screen. Boolean; false by default.
connectionSettingsConnection settings (URL, keys, certificates)
baseUrlPayment gateway base URL
publicKeyPayment gateway public key
certificatesPayment scheme certificates (scheme, certificate, algorithm)
tdsSettings3DS authentication flow settings — replaces the v1.x flat authenticationFlow / tdssUICustomization
authFirstFlow to try first: SDK (embedded 3DS SDK / application flow) or BROWSER (web-view flow). SDK by default.
authFallbackFall back to the other flow if the first fails. Boolean; false by default.
tdssUICustomization3DS SDK UI customization per EMVCo requirements
paymentMethodChoiceWho renders the method-selection screen: ON_SDK / onSdk (SDK draws its chooser) or ON_APP / onApp (your app decides). ON_APP by default.
availablePaymentMethodsMethods offered in the UI (ordered set): PAYMENT_TOKEN, CARD, ALIPAY (Pay with SuperQi), AQSATI. PAYMENT_TOKEN + CARD by default — SuperQi is off unless you add ALIPAY.
aliPaySettingsSettings of the Pay with SuperQi (ALIPAY) method
showFirstOption displayed first: QR or LINK (deep link). QR by default.
qrToDeepLinkFallbackAlso show an "open the payment app" button next to the QR. Boolean; false by default.
deepLinkToQrFallbackAlso show a QR (and app-download option) next to the deep-link button. Boolean; false by default.
merchantMerchant display settings. Required on Androidbuild() throws SdkIllegalStateException without it. Optional on iOS.
nameMerchant name to display for the payment
logoUrlLightMerchant logo URL for the light theme
logoUrlDarkMerchant logo URL for the dark theme
finishPaymentUriiOS only. URI that returns the payer to your app after an external-wallet (SuperQi deep-link) payment, e.g. finon://payment. Must match a registered CFBundleURLTypes URL scheme; Android declares its scheme in AndroidManifest.xml instead.
languageDeprecated. v1.x UI language enum, kept for backward compatibility; localization.selectedLanguageCode has priority.
writingDirectionDeprecated. v1.x top-level direction; localization.writingDirection has priority.
tdssUICustomizationDeprecated. v1.x top-level 3DS customization; tdsSettings.tdssUICustomization has priority.

Enums

EnumKotlin valuesSwift valuesNotes
AvailablePaymentMethodsCARD, ALIPAY, PAYMENT_TOKEN, AQSATI.CARD, .ALIPAY, .PAYMENT_TOKEN, .AQSATIALIPAY = Pay with SuperQi; AQSATI = BNPL installments
PaymentMethodChoiceON_SDK, ON_APP.onSdk, .onAppSDK default: on-app
PaymentTypeAliPayQR, LINK.QR, .LINKAliPaySettings.showFirst
AuthTypeTDSSDK, BROWSER.SDK, .BROWSERTDSSettings.authFirst
ThemeLIGHT, DARK, SYSTEM.light, .dark, .system
WritingDirectionLEFT_TO_RIGHT, RIGHT_TO_LEFT, SYSTEM.leftToRight, .rightToLeft, .auto
Token typeAUTH, NON_RECUR, UNAUTHsameSee PaymentDetails.tokenType below

SDK methods

MethodKotlin (Android)Swift (iOS)
InitializePaymentSDK.initialize(context, config, exitCallback)PaymentSDK(with: config) (instance)
Process paymentPaymentSDK.processPayment(paymentDetails, onSuccess, onError)sdk.processPayment(paymentDetails, onSuccess:, onError:) — call inside Task { @MainActor }
Set customer info— (passed in PaymentDetails.customerInfo)sdk.setCustomerInfo(...)must be called before payments to initialize local storage
Update configurationPaymentSDK.updateConfiguration(value) — overloaded per type: method set, PaymentMethodChoice, AliPaySettings, LanguageCode, Theme, PaymentSDKLocalizationsdk.updatePaymentSDKConfiguration(theme:), (selectedLanguage:), (writingDirection:), (availablePaymentMethods:), (paymentMethodChoice:), (aliPaySettings:)
Get payment tokensPaymentSDK.getPaymentTokens(accountId)List<PaymentToken>PaymentSDK.getPaymentTokens(for: accountId)[PaymentToken]
Latest token transactionsPaymentSDK.getLatestTokenTransactions(paymentToken)PaymentSDK.getLatestTokenTransactions(for: paymentToken)
Block payment tokenPaymentSDK.blockPaymentToken(paymentToken)PaymentSDK.blockPaymentToken(for: paymentToken)
Transfer payment tokensPaymentSDK.transferPaymentTokens(accountId, tokens)PaymentSDK.transferPaymentTokens(accountId, tokens)
Set gateway base URL / keyPaymentSDK.setPaymentGatewayBaseUrl(...)PaymentSDK.setPaymentGatewayBaseUrl(...)
Set scheme certificatePaymentSDK.setPaymentSchemaCertificate(scheme, certificate, algorithm)PaymentSDK.setPaymentSchemaCertificate(for:with:algorithm:)
Form-closure subscriptionExit callback passed to initialize / PaymentSDK.exitSdk { ... }Observe the finon_pay_sdk_on_back_click notification; confirm with sdk.cancel()
Base URL normalization differs per platform

Android expects a trailing / on baseUrl and appends it itself; iOS strips it. Pass the raw URL to each platform and let the native side normalize.

PaymentDetails attributes

AttributeSub-attributeDescription
paymentIdPayment identifier returned from the payment gateway
requestIdRequest identifier from the application
customerInfoPayer's data
accountIdAccount (user) identifier. Must be non-null in v2.0.4.
amountPayment amount (null for non-payment operations)
currencyPayment currency
paymentMethodMethod for the payment
paymentTypePAYMENT_TOKEN, CARD, ALIPAY (Pay with SuperQi), or AQSATI
paymentTokenPaymentToken.id when paymentType is PAYMENT_TOKEN
nonPaymentOperationMarks a non-payment operation; amount must be null
withoutAuthenticateOperation without payer authentication
needPaymentTokenGenerate a paymentToken from a successful payment; must be true for non-payment operations
tokenTypeRequested token type, in descending capability: AUTH (any operations), NON_RECUR (any except recurring), UNAUTH (authentication only). If the requested capability is lower than what the operation produced, the requested type is returned; otherwise the resulting token is returned.
additionalInfoExtra display data as <key1>:<value1>,<key2>:<value2>,…
aPlusWalletIdWallet identifier for Facial Recognition Authentication

Exceptions

ExceptionThrown when
SDKNotInitializedExceptionAn SDK feature is used before initialization completed
SDKAlreadyInitializedExceptioninitialize is called again within the same application lifecycle
SDKRuntimeExceptionUnexpected runtime error (network, server, invalid input) during an SDK operation
SdkIllegalStateExceptionAndroid: PaymentSDKConfiguration.Builder().build() called without setMerchant(...)

Handling examples for each are on the Android and iOS pages.

Flutter channel quick reference

Channel name: payment_sdk_flutter — full wrapper and bridge code in Flutter Integration.

Channel methodPurposeKey arguments
initializeSDKBuild the native config and initialize the SDKbaseUrl, publicKey, terminalId, authUsername, authPassword, language (english/arabic/kurdish/auto), theme, writingDirection, availablePaymentMethods (List<String>), paymentMethodChoice, aliPayShowFirst, merchantName, merchantLogoUrlLight, merchantLogoUrlDark
processPaymentRun a payment through the native SDK UIpaymentId, requestId, amount, currency, accountId, paymentType, paymentToken, needPaymentToken, tokenType, additionalInfo
getPaymentTokensSaved tokens for an accountaccountId
updatePaymentMethodsReconfigure a running SDKavailablePaymentMethods, paymentMethodChoice, aliPayShowFirst
Channel error codePlatformMeaning
SDK_NOT_INITIALIZEDbothCalled before initializeSDK succeeded
SDK_ALREADY_INITIALIZEDbothinitializeSDK called twice
PAYMENT_ERRORbothPayment failed or was cancelled
UPDATE_ERRORAndroidRuntime reconfiguration failed
INVALID_ARGUMENTSiOSMalformed argument map