Success and Error types
Results returned from WalletCallback
WalletSuccess
The Wallet Success model provides information regarding the successful operation. This information can include data. The method being called defines what returned data to expect.
Field | Type | Description |
|---|---|---|
type | enum SuccessType(successCode: Int) | See SuccessType |
message | String? | |
data | T? | Any? | Type is based on the method called. See 'WalletCallback', 'SDK Methods', 'Definitions' and 'Sequence diagrams' |
SuccessType
Returned type from WalletCallback onSuccess(WalletSuccess)
Enum | Description |
|---|---|
GENERAL_SUCCESS | The SDK method called is finished and the outcome was successful |
AUTHENTICATE_SUCCESS | Partia open wallet flow. Consumer has been authenticated and can access the Wallet dashboard. Open the URL returned in data: AuthenticateData. See 'Definitions'. |
ONBOARDING_SUCCESS | Partial open wallet flow. Consumer has been onboarded and can access the Wallet dashboard. DPA can decide what to do before opening the URL returned in data: AuthenticateData. See 'Definitions'. Consumer can |
USER_CLOSED_WALLET | Standard open wallet flow. |
USER_CLOSED_PAYMENT_DIALOG | Standard payment flow. |
USER_CANCELLED_SIGNING | Consumer cancels authentication for e.g. opening the wallet or signing a transaction |
USER_CANCELLED_ONBOARDING | Consumer cancels the onboarding |
WalletException
The Wallet Exception model provides information as to why a method failed.
The information is targeted towards DPA developers, and should be mapped to more informative and translated end-user messages.
Field | Type | Description |
|---|---|---|
type | enum ExceptionType(errorCode: Int) | See ExceptionType |
message | String | Format: 'action': A 'type' error occurred during 'internalAction': 'reason'
Action = the action of the method being called, e.g. Open wallet or Get payment information |
code | Int | Long | Same as type.errorCode |
externalCode | String? | The original error code from the origin, where applicable (Aera Wallet API/Aera Secure ID SDK). Aera Wallet API errors are defined under Aera Wallet Api Response codes |
timestamp | String? | When the exception occurred, if passed from Aera Wallet API |
cid | String? | The correlation ID, a reference for easier debugging, if passed from Aera Wallet API |
cid | String? | The type of the correlation ID when present, e.g. "sessionId" |
cause | Throwable? | NSError? | The original error causing the reported exception, when applicable |
domain | String | com.aerahost.aerawalletssdk (android) |
ExceptionType
Returned type from WalletCallback onError(WalletException)
| Field | Type | Description |
|---|---|---|
| errorCode | Int | The code associated with the ExceptionType enum |
The error codes returned from the Wallets SDK are split into 3 error ranges based on origin
- Wallets SDK errors (6800-68099)
- SID_SDK: Aera Secure ID SDK errors (68300-68399)
- NETWORK: Aera Wallet API errors (68100-68199)
Potential mitigations
- Look at the externalCode and other fields for more information
- Map error messages to understandable end-user messages, and provide and display the "cid" and "timestamp" when present. Screenshots by end-users could then help Aera with debugging.
- Securely report information from DPA to DPA backends to be able to report issues back to Aera
- Contact Aera Support when an issue does not seem to resolve
Wallet SDK errors
errorCode | Name | Description |
|---|---|---|
68000 | UNKNOWN_ERROR | |
68001 | GENERAL_ERROR | |
68002 | WEBVIEW_ERROR | Standard flow only. |
68003 | SESSION_ERROR | A session could not be found or validated |
68004 | SESSION_EXPIRED_ERROR | Standard flow only. The consumer session inside the Wallets WebView expired, and consumer is kicked out of the wallet. The Mobile App decides what to do next, e.g. show session expiration page or do a new openWallet(). |
68005 | ACTION_NOT_SUPPORTED | The wallet could not handle the requested action, e.g. open wallet |
68006 | MISSING_DATA_ERROR | An internal operation could not be conducted because the Wallet SDK was missing required data. |
Secure ID SDK errors
The errorCodes below are mapped from external codes from Secure ID. The external codes are available in the 'externalCode' field.
errorCode | Name | Description |
|---|---|---|
68100 | SID_SDK_DEVICE_NOT_SUPPORTED_ERROR | The device is not supported by Secure ID in its current state. E.g. The API level is too low, device is not secure or device is not compatible with other requirements |
68101 | SID_SDK_NOT_INITIALIZED_ERROR | User is not onboarded with Secure ID on this device |
68102 | SID_SDK_INCOMPATIBLE_ERROR | The Secure ID SDK is too old, has been blocked, or has been revoked |
68103 | SID_SDK_INITIALIZATION_ERROR | An error occurred during onboarding via Aera Secure ID SDK. |
68104 | SID_SDK_SIGN_ERROR | An error occurred during signing, e.g. to open wallet or sign payment. An error occurred, app pin could have been revoked, biometrics was cancelled by user etc. |
68105 | SID_SDK_GENERAL_ERROR | |
68106 | SID_SDK_USER_CANCELLED_ERROR | User cancelled the operation |
68107 | SID_SDK_NETWORK_ERROR | A Network communication, HTTP, or SSL error occurred between Secure ID SDK and other backend systems. |
Wallet API errors
The errorCodes below are mapped from response codes from the Wallet API. The response codes are available in the WalletException 'externalCode' field. All Wallet API response codes values are defined under Aera Wallet Api Response codes.
errorCode | Name | Description |
|---|---|---|
68300 | NETWORK_GENERAL_ERROR | |
68301 | NETWORK_INTERNAL_SERVER_ERROR | An error occurred inside a backend system |
68302 | NETWORK_CLIENT_ERROR | The Wallets SDK request did not meet backend requirements. |
68303 | NETWORK_UNAUTHORIZED_ERROR | The end-user was not successfully authorized, e.g. invalid session credentials, invalid signature, or consumer mismatch |
68304 | NETWORK_INADEQUATE_SECURITY_LEVEL_ERROR | The operation could not be conducted because one or more security requirements were not met |
68305 | NETWORK_FORBIDDEN_OPERATION_ERROR | The operation could not be conducted. The operation is forbidden or is not possible to conduct right now, e.g. when a transaction state has changed (like trying to cancel a signed transaction) |
68350 | NETWORK_PAYMENT_INSUFFICIENT_FUNDS_ERROR | Not enough balance to process the transaction |
68351 | NETWORK_PAYMENT_AUTHORIZATION_FAILED_ERROR | Authorization failed. For partial payment: |
68352 | NETWORK_NO_VALID_PAYMENT_INSTRUMENTS_ERROR | No payment instruments are active and can be used for the payment |
68353 | NETWORK_NO_FALLBACK_PAYMENT_INSTRUMENT_ERROR | No fallback instrument was found during hybrid payments |
Updated about 1 month ago
