HomeGuidesAPI ReferenceChangelog
Log InChangelog
Guides

SDK Methods

Related sections


Sessions

A valid session id and key are almost always required as arguments in order to call the SDK methods. To create a session, the Mobile App Backend needs to create a session and return it to the Mobile App, either via API or push messages. See the API Reference and Create Wallet Session.


Android vs iOS

Android and iOS methods behave similarly, but iOS methods often requires a keychain group parameter as well.


Generic methods

Current available methods for Android and iOS are outlined below.

SignatureDescription
deleteWalletDelete the wallet and secure ID of the consumer. The consumer must go through the onboarding again if they later want to use the wallet.
getSDKInfoReturns relevant Wallets- and Secure ID SDK information
getDynamicSDKIdReturns a dynamic and unique Secure ID SDK ID.
getOpenWalletURLOnboards/authenticates the consumer and returns a URL to the Wallets Dashboard for managing payment instruments. Mobile App is responsible for opening the dashboard.
openURLEnables opening a wallet URL via the Wallets SDK implemented system browser. Accepted URL must be for the wallet. For instance, the URL returned from getOpenWalletUrl or a wallet redirectUri during payment instrument onboarding.
getPaymentInfoRetrieves payment information and returns the information to the Mobile App. Mobile App is responsible for displaying the payment information to be signed in a payment UI.
signPaymentSigns the payment with SCA. Mobile App is responsible for displaying success/error.
cancelPaymentInforms backend systems of consumer cancelling a payment from Mobile App payment UI

deleteWallet

Deletes both Wallet and Secure ID of the consumer. Will call delete on keys in secure hardware and delete other data used by the SDK. Requires consumer authentication

Parameter nameParameter typeNote
sessionKeyStringUUID
sessionIdStringUUID
keychainGroupStringiOS only
🆕authRedirectUriStringThe secure ID redirect URI for the Mobile App, in case onboarding is initiated. See 'Aera Secure ID' section under Getting started for more information.
callbackWalletCallbackSee WalletCallbacksection

Android Example

walletsSDK.deleteWallet(sessionId, sessionKey, callback)

🆕iOS Example

AeraWalletsSDK.shared.deleteWallet(
  sessionId: sessionId,
  sessionKey: sessionKey,
  keychainGroup: keychainGroup,
  authRedirectUri: redirectUri,
  callback: callback
)

// Using objc header: AeraWalletsSDK.shared.deleteWalletWithSessionId(...

getSDKInfo

Returns SDK information, including Secure ID information.

Arguments

Parameter nameParameter typeNote
keychainGroupStringiOS only
callbackWalletCallbackSee WalletCallbacksection

Returns

Parameter name

Parameter type

Note

data

SDKInfo

See WalletCallbacksection See DefinitionsSection

Android Example

walletsSDK.getSDKInfo(callback)

iOS Example

AeraWalletsSDK.shared.getSDKInfo(
  keychainGroup: keychainGroup,
  callback: callback
)

// Using objc header: AeraWalletsSDK.shared.getSDKInfoWithKeychainGroup(...

getDynamicSDKId

Returns a dynamic and unique Secure ID SDK ID.

Arguments

Parameter nameParameter typeNote
keychainGroupStringiOS only
callbackWalletCallbackSee WalletCallbacksection

Returns

Parameter name

Parameter type

Note

data

String

UUID The dynamic ID

Android Example

walletsSDK.getDynamicSDKId(callback)

iOS Example

AeraWalletsSDK.shared.getDynamicSDKId(
  keychainGroup: keychainGroup,
  callback: callback
)

// Using objc header: AeraWalletsSDK.shared.getDynamicSDKIdWithKeychainGroup(...

getOpenWalletURL

Wallets SDK will handle most of the lifecycle for the merchant. The SDK will check device compatibility, if the consumer has been onboarded before, and select the correct onboarding or signing options for SCA before returning a Wallets Frontend URL to the Mobile App. Consumers must authenticate, either by onboarding with pre-defined Identity Providers, or if already onboarded, signing in with app pin (and biometrics when used).

The Mobile App is responsible for calling openUrl to open the wallets dashboard using the url returned in AuthenticateData.

Arguments

Parameter nameParameter typeNote
sessionKeyStringUUID
sessionIdStringUUID
🆕authRedirectUriStringThe secure ID redirect URI for the Mobile App, in case onboarding is initiated. See 'Aera Secure ID' section under Getting started for more information.
callbackWalletCallbackSee WalletCallbacksection

Returns

Parameter name

Parameter type

Note

data

AuthenticateData

See WalletCallbacksection See DefinitionsSection

Example

walletsSDK.getOpenWalletUrl(sessionId, sessionKey, callback)

iOS Example

AeraWalletsSDK.shared.getOpenWalletUrl(
  sessionId: sessionId,
  sessionKey: sessionKey,
  keychainGroup: keychainGroup,
	authRedirectUri: authRedirectUri,
  callback: callback
)

// Using objc header: AeraWalletsSDK.shared.getOpenWalletUrlWithSessionId(...

🆕 openURL

Enables opening the wallets dashboard via the Wallets SDK implemented system browser.

⚠️ iOS only: Remember to implement handleDeeplink to ensure the system browser is closed correctly, as it does not close automatically when deeplinks are triggered, e.g. while consumer is inside the wallets dashboard.

Arguments

Parameter name

Parameter type

Note

url

String

The URL to be used to open the wallets dashboard.
E.g. from getOpenWalletUrl or redirect from payment instrument onboarding.

callback

WalletCallback

See WalletCallbacksection

Example

walletsSDK.openURL(url, callback)

iOS Example

AeraWalletsSDK.shared.openURL(
  url: url,
  callback: callback
)

getPaymentInfo

Wallets SDK will handle retrieval of payment information.

The Mobile App is responsible for opening a payment UI using their own UI and signing the payment with the payment instrument ID selected by the consumer.

Returns payment information to be displayed and used for payment.

The method should first be called when the Mobile App backend has triggered the Mobile App to do so after the Merchant Store (POS) has initiated a sale. See “Data flows” section.

Arguments

Parameter nameParameter typeNote
sessionKeyStringUUID
sessionIdStringUUID
keychainGroupStringiOS only
callbackWalletCallbackSee WalletCallbacksection

Returns

Parameter name

Parameter type

Note

data

PaymentData

See WalletCallbacksection See DefinitionsSection

Android Example

walletsSDK.getPaymentInfo(sessionId, sessionKey, callback)

iOS Example

AeraWalletsSDK.shared.getPaymentInfo(
  sessionId: sessionId,
  sessionKey: sessionKey,
  keychainGroup: keychainGroup,
  callback: callback
)

// Using objc header: AeraWalletsSDK.shared.getPaymentInfoWithSessionId(...

signPayment

The method should be called whenever a consumer wants to sign the payment, e.g. clicking a pay button inside the Mobile App Payment UI.

Wallets SDK will handle SCA for signing the payment.

Mobile App is responsible for displaying confirmation/error feedback to the consumer.

Arguments

Parameter name

Parameter type

Note

sessionKey

String

UUID

sessionId

String

UUID

data / signPaymentData

SignPaymentData?

Do not include when chosen payment instrument(s) are pre-decided. See Definitionssection

keychainGroup

String

iOS only

callback

WalletCallback

See WalletCallbacksection


Returns

Parameter nameParameter typeNote
dataPaymentResult?For flows allowing fallback instrument or remainder to pay outside wallet. Useful for feedback after a successful or partial successful payment, e.g. what instruments failed and succeeded, displaying what was deducted against what was initially expected to be deducted.

Android Example

walletsSDK.signPayment(sessionId, sessionKey, signPaymentData, callback)

iOS Example

 AeraWalletsSDK.shared.signPayment(
   sessionId: sessionId,
   sessionKey: sessionKey,
   keychainGroup: keychainGroup,
   callback: callback
)
   
// Using objc header: AeraWalletsSDK.shared.signPaymentWithSessionId(...

cancelPayment

The method should be called whenever a consumer wants to cancel a payment via the Mobile App Payment UI before a transaction is finished.

After the Mobile App Payment UI is opened, the Mobile App must notify other systems of any payment cancellation initiated by the consumer, e.g. consumer clicking cancel/close buttons or swiping away a dialog. The method should not be called when cancellation occurs after the transaction has been conducted with success or error result.

Arguments

Parameter nameParameter typeNote
sessionKeyStringUUID
sessionIdStringUUID
callbackWalletCallbackSee WalletCallbacksection

Android Example

walletsSDK.cancelPayment(sessionId, sessionKey, callback)

iOS Example

 AeraWalletsSDK.shared.cancelPayment(
   sessionId: sessionId,
   sessionKey: sessionKey,
   keychainGroup: keychainGroup,
   callback: callback
)
   
// Using objc header: AeraWalletsSDK.shared.cancelPaymentWithSessionId(...

🆕 iOS Methods

Signature

Description

setAuthCallbackAppName

Provides your app name to the Secure ID SDK used during onboarding. Should be provided during App initialization.

handleDeeplink

Handles deeplink to your Mobile App and provides it to the Secure ID SDK during onboarding.

If the deeplink is not an onboarding url, will try to close the Wallets SDK system browser (if opened).

Should be provided during native deeplink "onOpenUrl".


🆕 setAuthCallbackAppName

Parameter nameParameter typeNote
nameStringThe name of your app, e.g. the last section of authRedirectUri. If the Mobile App has multiple app builds, remember to use different names. See "Aera Secure ID" section under "Getting Started" for more information.

iOS Example

init {
  AeraWalletsSDK.shared.setAuthCallbackAppName(name: "myAppName")
}

🆕 handleDeeplink

Parameter nameParameter typeNote
urlStringThe Secure ID redirectUri returned as a deeplink during the Secure ID Onboarding. Includes the App Name in the callback. See "Aera Secure ID" section under "Getting Started" for more information.

iOS Example

.onOpenURL { url in
    AeraWalletsSDK.shared.handleDeeplink(url: url)
}