Interface DigitalCardService
- Since:
- 4.3.0
-
Method Summary
Modifier and TypeMethodDescriptionactivateDigitalCard(String digitalCardID) Activates the digital card which has been digitized but has not performed ID&V (Step up authentication - Yellow Flow inApp Verification).activateDigitalCard(String cardID, OEMPayType oemType) Activates the digital card which has been digitized but has not performed ID&V (Step up authentication - Yellow Flow inApp Verification).voidapproveBinding(String digitalCardID, String bindingReference, BindReason reason, D1Task.Callback<Void> callback) Deprecated.voidapproveCardholderVerification(String digitalCardID, VerificationReason reasonCode, D1Task.Callback<Void> callback) Deprecated.UsestepUpAuthenticationResult(String, String, Result)instead.getDigitalCardList(String cardID) Retrieves the digital cards associated with the given card identifier.static StepUpAuthenticationDetailsparseStepUpVerificationDetails(String verificationDetails) Parses step-up verification details from a Base64-encoded JSON payload.stepUpAuthenticationResult(String digitalCardID, String authenticationID, Result result) Performs step-up authentication for device binding and cardholder verification.voidunbindDevice(String digitalCardID, String bindingReference, UnbindReason reasonCode, D1Task.Callback<Void> callback) Unbinds a device from a digital card.updateDigitalCard(String cardID, DigitalCard digitalCard, CardAction cardAction) Updates the state of a digital card when one of the following actions is performed: Resume, Suspend, or Delete.
-
Method Details
-
getDigitalCardList
Retrieves the digital cards associated with the given card identifier. Cards that have not been digitized produce an empty list. Each card includes device binding information and identifies whether it is bound to the current device.- Parameters:
cardID- The card identifier.- Returns:
- A task that returns a non-null list of digital cards.
Possible errors:
- Since:
- 4.6.0
-
updateDigitalCard
@NonNull Task<Boolean> updateDigitalCard(@NonNull String cardID, @NonNull DigitalCard digitalCard, @NonNull CardAction cardAction) Updates the state of a digital card when one of the following actions is performed: Resume, Suspend, or Delete.Arguments are validated and the core configuration is checked when this method is called. The state change is performed when the returned task is executed.
- Parameters:
cardID- The card identifier.digitalCard- The digital card received fromgetDigitalCardList(String).cardAction- The action to perform:CardAction.RESUME,CardAction.SUSPENDorCardAction.DELETE.- Returns:
- A task returning
truewhen the digital card state has been updated.Possible errors when executing the task:
D1Exception.ErrorCode.ERROR_NOT_LOGGED_IND1Exception.ErrorCode.ERROR_NOT_AUTHORIZEDD1Exception.ErrorCode.ERROR_DEVICE_ENVIRONMENT_UNSAFED1Exception.ErrorCode.ERROR_INVALID_ARGUMENTD1Exception.ErrorCode.ERROR_CARD_NOT_FOUNDD1Exception.ErrorCode.ERROR_CARD_NOT_MANAGED_BY_D1D1Exception.ErrorCode.ERROR_CLIENT_BINDING_STORAGED1Exception.ErrorCode.ERROR_ISSUER_TOKEN_MISSING_CBPD1Exception.ErrorCode.ERROR_CARDD1Exception.ErrorCode.ERROR_CORE
- Throws:
IllegalArgumentException- when a parameter is null or empty.IllegalStateException- when the core module has not been configured.- Since:
- 4.6.0
-
approveBinding
void approveBinding(@NonNull String digitalCardID, @NonNull String bindingReference, @Nullable BindReason reason, @NonNull D1Task.Callback<Void> callback) Deprecated.UsestepUpAuthenticationResult(String, String, Result)instead.Approves the device binding for a digital card.- Parameters:
digitalCardID- The unique identifier of the digital card.bindingReference- Corresponds to Visa device index.reason- The reason for device binding approval. If it is not provided, it defaults toBindReason.ISSUER_DECISION.callback- The callback for the result. When it is successful, the returned argument ofD1Task.Callback.onSuccess(Object)is always null.
Possible errors:
- Since:
- 4.3.0
-
unbindDevice
void unbindDevice(@NonNull String digitalCardID, @NonNull String bindingReference, @Nullable UnbindReason reasonCode, @NonNull D1Task.Callback<Void> callback) Unbinds a device from a digital card.- Parameters:
digitalCardID- The unique identifier of the digital card.bindingReference- Corresponds to Visa device index.reasonCode- The reason for device unbinding. If it is not provided, it defaults toUnbindReason.ISSUER_DECISION.callback- The callback for the result. When it is successful, the returned argument ofD1Task.Callback.onSuccess(Object)is always null.
Possible errors:
- Since:
- 4.3.0
-
approveCardholderVerification
void approveCardholderVerification(@NonNull String digitalCardID, @Nullable VerificationReason reasonCode, @NonNull D1Task.Callback<Void> callback) Deprecated.UsestepUpAuthenticationResult(String, String, Result)instead.Approves cardholder verification for a digital card.- Parameters:
digitalCardID- The unique identifier of the digital card.reasonCode- The reason for verification approval. If it is not provided, it defaults toVerificationReason.ISSUER_DECISION.callback- The callback for the result. When it is successful, the returned argument ofD1Task.Callback.onSuccess(Object)is always null.
Possible errors:
- Since:
- 4.3.0
-
parseStepUpVerificationDetails
@NonNull static StepUpAuthenticationDetails parseStepUpVerificationDetails(@NonNull String verificationDetails) throws D1Exception Parses step-up verification details from a Base64-encoded JSON payload.This static utility method extracts and normalizes verification details from token service provider payloads (Visa and Mastercard) to facilitate step-up authentication workflows.
The method supports both Visa and Mastercard payload formats and automatically detects the format based on the presence of specific fields.
- Parameters:
verificationDetails- Base64-encoded JSON string containing verification details from the token service provider- Returns:
- Parsed
StepUpAuthenticationDetailsobject containing normalized verification information - Throws:
D1Exception- withD1Exception.ErrorCode.ERROR_INVALID_ARGUMENTif:- The input is null or empty
- The Base64 encoding is invalid
- The JSON format is malformed
- Required fields are missing
- The payload format is not recognized (neither Visa nor Mastercard)
- Since:
- 4.6.0
- See Also:
-
stepUpAuthenticationResult
@NonNull Task<Void> stepUpAuthenticationResult(@NonNull String digitalCardID, @NonNull String authenticationID, @NonNull Result result) Performs step-up authentication for device binding and cardholder verification.Usage:
- Parse the verification details received from the token service provider using
parseStepUpVerificationDetails(String). - Extract the digitalCardID using
StepUpAuthenticationDetails.getDigitalCardID() - authenticationID: refer to D1 Product documentation portal.
- Perform user authentication and determine the result
- Call this method with the extracted values and authentication result
- Parameters:
digitalCardID- The unique identifier of the digital card. UseStepUpAuthenticationDetails.getDigitalCardID()to obtain this value from the parsed verification details.authenticationID- A unique identifier for the authentication session. UseStepUpAuthenticationDetails.getAuthenticationID()to obtain this value from the parsed verification details.result- The result of the step-up authentication. SeeResult.- Returns:
- A
Taskthat executes the operation asynchronously. When successful, the task returns null, or throwsD1Exceptionon failure.
Possible errors:
- Since:
- 4.6.0
- Parse the verification details received from the token service provider using
-
activateDigitalCard
Activates the digital card which has been digitized but has not performed ID&V (Step up authentication - Yellow Flow inApp Verification).
Integrator should call this API when the return state of
PushProvisioningService.getCardDigitizationState(String, OEMPayType)isCardDigitizationState.PENDING_IDV.Possible errors when executing the task:
D1Exception.ErrorCode.ERROR_NOT_LOGGED_IND1Exception.ErrorCode.ERROR_NOT_AUTHORIZEDD1Exception.ErrorCode.ERROR_DEVICE_ENVIRONMENT_UNSAFED1Exception.ErrorCode.ERROR_CORED1Exception.ErrorCode.ERROR_CARDD1Exception.ErrorCode.ERROR_INVALID_ARGUMENTD1Exception.ErrorCode.ERROR_CARD_NO_PENDING_IDVD1Exception.ErrorCode.ERROR_GPAYD1Exception.ErrorCode.ERROR_GPAY_NOT_SUPPORTEDD1Exception.ErrorCode.ERROR_SPAY_NOT_SUPPORTEDD1Exception.ErrorCode.ERROR_SPAY
- Parameters:
cardID- The card identifier.oemType- The OEM type (Google Pay or Samsung Pay).- Returns:
- A task returning void.
- Since:
- 4.6.0
-
activateDigitalCard
Activates the digital card which has been digitized but has not performed ID&V (Step up authentication - Yellow Flow inApp Verification).
Integrator should call this API to activate a digital card when a wallet app redirects digital card activation process to the Issuer app.
Possible errors when executing the task:
- Parameters:
digitalCardID- The digital card identifier.- Returns:
- A task returning void.
- Since:
- 4.6.0
-
stepUpAuthenticationResult(String, String, Result)instead.