Code

public enum Code : Int, CaseIterable

Contains the D1 error codes.

Note

D1 SDK returns one of these error codes for each D1Error.

Since

1.0.0

  • The operation has been cancelled.

    Declaration

    Swift

    case cancelled = 10001
  • Either the end user is not logged in or the login validity has expired. Please get the end user to log in before performing subsequent requests.

    Note

    Proceed to log in before performing subsequent requests. End user who is already logged in, will need to login again.

    Declaration

    Swift

    case notLoggedIn = 10005
  • The end user is not authorized to perform this operation. Verify that the parameters requested are correct.

    Note

    Perform the operation again.

    Declaration

    Swift

    case notAuthorized = 10006
  • The device environment is potentially unsafe. Ensure that the device environment is safe.

    Note

    Ensure that the device environment is safe.

    Declaration

    Swift

    case deviceEnvironmentUnsafe = 10007
  • The cardID provided is not found. Ensure that the cardID is correct.

    Note

    Integrator should ensure that the cardID is correct.

    Declaration

    Swift

    case cardNotFound = 10009
  • The consumer/card is not active. Ensure that the consumer/card is active.

    Note

    Integrator should ensure that the consumer/card is active.

    Declaration

    Swift

    case notActive = 10010
  • The provided appGroupID is not valid. Internally, among others, D1 SDK verify by using containerURL(forSecurityApplicationGroupIdentifier:). When this API return nil, D1 SDK return the error.

    Note

    Integrator should ensure that appGroupID is defined in the application and extension entitlement file or Xcode Capabilities tab.

    Since

    3.3.0

    Declaration

    Swift

    case invalidAppGroupID = 10011
  • Error encountered whilst executing core operations. It is caused by storage (unlikely) or network failure.

    Note

    Integrator should check the underlying errors for more details. Ensure that the device has internet connection.

    Declaration

    Swift

    case core = 20001
  • Card activation methods for this card are not found.

    Note

    Integrator should first retrieve the activation method for this card.

    Declaration

    Swift

    case noCardActivationMethod = 20002
  • The required UI component is not found.

    Note

    Integrator should provide the necessary UI component.

    Declaration

    Swift

    case uiComponentNotFound = 20003
  • There is a mismatch with the PIN inputs.

    Note

    Integrator should ensure that the provided PINs are identical.

    Declaration

    Swift

    case pinMismatch = 20004
  • The card is not issued by D1.

    The API only supports the cards issued by D1. Integrator should ensure that the cardID are issued by D1.

    Since

    3.3.0

    Declaration

    Swift

    case cardNotManagedByD1 = 20005
  • The keychain operation is failing and it is unrecoverable. It could be caused by the device passcode that has been turned off and the end user continues to perform D1 operation (that is, login).

    Note

    Integrator should perform the reset function to clean up the keychain. Ensure that the passcode is turned on before performing any D1 operation.

    Since

    3.0.0 case unrecoverable = 20006

    Declaration

    Swift

    case unrecoverable = 20006
  • The push token is not found when registering the notification for card issued by D1.

    Integrator should call D1Task.updatePushToken(_:completion:) before calling MessagingService.registerNotification(_:completion:).

    Since

    3.3.0

    Declaration

    Swift

    case pushTokenNotFound = 20007
  • The consumerID is not provided during Apple Pay Wallet extension. When D1Task.configure(_:completion:) is called with ConfigParams.walletExtensionConfig(cardParamsList:appGroupID:), it should also contain ConfigParams.coreConfig(consumerID:).

    Note

    During wallet extension configuration, integrator should provide both ConfigParams.walletExtensionConfig(cardParamsList:appGroupID:) and ConfigParams.coreConfig(consumerID:) to D1Task.configure(_:completion:).

    Since

    3.3.0

    Declaration

    Swift

    case walletExtensionConsumerIDNotFound = 20008
  • The appGroupID is not found in Apple Pay Wallet UI and Non-UI extension. This could be due to several reasons:

    Note

    Integrator should ensure that main application is calling D1Task.configure(_:completion:) with ConfigParams.walletExtensionConfig(cardParamsList:appGroupID:) and appGroupID is defined in UI and non-UI extension targets capabilities.

    Since

    3.3.0

    Declaration

    Swift

    case walletExtensionAppGroupIDNotFound = 20009
  • There was an invalid entry with the PIN inputs.

    Note

    Integrator should ensure that the provided PINs are in valid format. Ensure the length is correct and only numerics are used.

    Since

    3.3.0

    Declaration

    Swift

    case pinInvalid = 20010
  • PIN change operation is forbidden on this card.

    Note

    Integrator should ensure that PIN change operation is allowed on the provided card.

    Since

    3.4.0

    Declaration

    Swift

    case pinChangeForbidden = 20011
  • Risk assessment failed.

    Category - Risk API

    Note

    Integrator should check the underlying errors for more details. Ensure that the risk credentials are correct and the device has an internet connection.

    Remark

    D1Task.Components.riskURLString, D1Task.Components.riskClientID

    Declaration

    Swift

    case risk = 30001
  • Errors encountered whilst executing card operations. For underlying error with domain PKPassKitErrorDomain, refer to the Apple documentation for more details.

    Category - Card API

    Note

    Integrator should check the underlying errors for more details. Ensure that the card configurations are correct and the device has internet connection.

    Remark

    D1TaskComponents.digitalCardURLString, D1TaskComponents.issuerID.

    Declaration

    Swift

    case card = 40001
  • The feature is not supported. This may be due to a variety of reasons. For example, hardware functionality, and parental control restriction.

    Category - Card API

    Note

    Integrator should display information to end user on why it is not supported.

    Declaration

    Swift

    case cardNotSupported = 40002
  • No pending activation of the digital card. No digital card is found with CardDigitizationState equal to CardDigitizationState.pendingIDVLocal or CardDigitizationState.pendingIDVRemote.

    Category - Card API

    Note

    Integrator may check the state of the card by calling D1Task.cardDigitizationState(_:completion:).

    Declaration

    Swift

    case cardNoPendingIDV = 40003
  • Operation (resume/suspend/replace) is not allowed on the card issued by D1. It may be due to the card state and state reason.

    Category - Card API

    Note

    Integrator should display information to the end user that the card operation is not allowed because the current card state and reason.

    Since

    3.3.0

    Declaration

    Swift

    case cardOperationNotAllowed = 40011
  • Operation (replace) is not allowed on the card issued by D1. It may be due to the state reason.

    Category - Card API

    Note

    Ensure that the state reason provided is valid. Refer to StateReason.replaceReasons() for the list of valid reasons.

    Since

    3.3.0

    Declaration

    Swift

    case cardOperationInvalidReason = 40012
  • The CardService.updateCardControlSettings(_:settings:completion:) or CardService.updateCardLimitSettings(_:settings:completion:) operation is not allowed on the card issued by D1. Update is performed on null property obtained from CardService.cardSettings(_:completion:).

    Category - Card API

    Note

    Do not set value on null property obtained from CardService.cardSettings(_:completion:). The null property indicates that the field is not supported/configured at the D1 backend.

    Since

    3.3.0

    Declaration

    Swift

    case cardSettingsOperationNotAllowed = 40013
  • The CardService.updateCardControlSettings(_:settings:completion:) or CardService.updateCardLimitSettings(_:settings:completion:) operation on card issued by D1 encounters an error because the value is not in the allowed format.

    Category - Card API

    Note

    Ensure that all the properties included in the card settings object follows the allowed format. Refer to ISO 3166-1 alpha-2 format for the list of countries allowed and ISO 4217 alpha code format for the list of currencies allowed.

    Since

    3.3.0

    Declaration

    Swift

    case cardSettingsInvalidFormat = 40014
  • The CardService.updateCardControlSettings(_:settings:completion:) or CardService.updateCardLimitSettings(_:settings:completion:) operation on card issued by D1 encounters error because the input format is correct but the value is incorrect.

    Category - Card API

    Note

    Ensure that all the mandatory properties included in the card settings object have the correct values.

    Since

    3.3.0

    Declaration

    Swift

    case cardSettingsInvalidValue = 40015
  • The required component is not configured.

    Note

    Integrator should check the underlying errors for more details. Ensure the required component has been configured.

    Declaration

    Swift

    case notInitialized = 60001
  • Invalid argument is passed to a method.

    Note

    Integrator should check the underlying errors for more details. Ensure the parameters are passed in the correct format.

    Declaration

    Swift

    case invalidArgument = 60002
  • Authn operations failed.

    Category - Authn API

    Note

    Integrator should check the underlying errors for more details.

    Declaration

    Swift

    case authn = 70001
  • Authn User is not enrolled.

    Declaration

    Swift

    case authnNotEnrolled = 70002
  • Authn Access denied

    Declaration

    Swift

    case authnAccessDenied = 70003
  • Authn Wrong Fingerprint denied

    Declaration

    Swift

    case authnBlocked = 70004
  • Authn Invalid Enrollment Token

    Declaration

    Swift

    case authnInvalidEnrollmentToken = 70005