MPoC SDK
API Reference
Error Codes

General Error Codes (MPoCErrorCode)

enum class MPoCErrorCode(val code: Int, val desc: String) {
    SUCCESS(0, "success"),
 
    ErrInvalidLicense(41000, "invalid license file"),
    ErrInitFails(41100, "sdk initialization fails"),
    ErrInvalidStatus(41101,"sdk is not initialized or registered"),
    ErrInsecureDeviceConfigure(41200, "insecure device settings"),
    ErrInsecureRunningEnvironment(41300, "insecure execution environment"),
    ErrAttestationFail(41400, "attestation result indicated fail"),
    ErrInvalidParameters(41500, "provided parameters are invalid"),
    ErrCryptoKeyMissing(41600, "cryptographic key invalid"),
    ErrCryptoInvalidKeyOrCert(41601, "cryptographic key invalid"),
    ErrKeyProvisionFails(41602, "key provision fails"),
    ErrCryptoOperationFails(41603, "cryptographic fails"),
    ErrRegistrationFails(41800, "registration fails"),
    ErrNetworkUnreachable(41900, "network connection with host fails"),
    ErrNetworkConnectionFailsOrTimeout(42000, "network connection fails or timeout"),
    ErrNetworkServerError(42100, "network server error"),
    ErrNetworkClientError(42200, "network client error"),
    ErrCardProcessingFailed(43000,"card processing fails"),
    ErrNoSupportedEmvApp(-3, "No application in card"),
    ErrKernelNoSupported(-38, "application is not supported or prohibited"),
 
 
    // unknown exception happens. please read the contextual of the returned object
    // to check the detail error exception
    ErrUnknownError(99999, "general unexpected unknown error");
 
}

EMV Transaction Returned Error Codes

enum class PaymentErrorCodes(val code: Int, val message: String) {
  // general errors
  InvalidInputRequest(70_001, "Invalid Input"),
 
  // aborted,the acitivity will finsih with specify error code and error message.
  AbortedProcessingTimeOut(70_009, "processing timeout"),
  AbortedNfcTappingTimeOut(70_002, "Nfc card tapping timeout"),
  AbortedUserCancelTapping(70_003, "User cancel card tapping"),
  AbortedUserCancelPIN(70_004, "User cancel PIN Entry"),
  AbortedPinEntryTimeOut(70_005, "PIN Entry timeout"),
  AbortedSecurityAlert(70_006, "Security Checks fail"),
  AbortedProcessQuit(70_007, "Processing Activity Quit"),
  AbortedCardKeyLoadingFail(70_008, "CardKey Loading fails"),
  AbortedCardReadRetryCountExceeded(70_009, "Card read retry count exceeded"),
  AbortedCardReadError(70_010, "EMV card declined"),
  AbortedCardDataValidationError(70_011, "Card data validation error"),
  AbortedCryptoOperationError(70_012, "MPoC crypto operation error"),
  AbortedCardDataEncryptionError(70_013, "MPoC crypto operation error"),
 
  //PIN entry eror
  PinKeyNotReady(71_005, "PIN Key is not ready, please retry"),
  PinProcessException(71_006, "PIN Entry exception"),
  PaymentProcessRetryableFail(71_004, "operation fails, please retry"),
 
  // other resource exception
  OtherSourceError(72_000, "Error from other source")
}