Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.

Use issuer application authentication

Let the issuer application manage Android device authentication during payment.

Overview

In this model, the issuer application manages Android device authentication during payment.

Use this model when the issuer application must fully control the authentication UX.

Flow

Implement ContactlessTransactionListener::onAuthenticationRequired().

The issuer application can use device credentials, biometric authentication, or another supported Android device authentication method.

When authentication succeeds, call ContactlessTransactionListener::onDelegatedDeviceAuthenticationSucceeded(timeOfAuth) as soon as possible.

Pass the authentication timestamp in milliseconds.

If the end user cancels the authentication step, call ContactlessTransactionListener::onDelegatedDeviceAuthenticationCancelled().

SDK

ContactlessTransactionListener paymentCallback = new ContactlessTransactionListener() {
    @Override
    public void onAuthenticationRequired(@NonNull VerificationMethod method) {
        // The issuer application manages Android device authentication.

        // If authentication succeeds, provide the authentication timestamp.
        // Call this API as soon as possible so the end user still has enough
        // time to perform the second tap.
        D1PayConfigParams.getInstance()
            .getContactlessTransactionListener()
            .onDelegatedDeviceAuthenticationSucceeded(System.currentTimeMillis());

        // If the end user cancels authentication, cancel the transaction.
        D1PayConfigParams.getInstance()
            .getContactlessTransactionListener()
            .onDelegatedDeviceAuthenticationCancelled();
    }

    // ...
};

// Register the contactless transaction callback.
D1PayConfigParams configParams = D1PayConfigParams.getInstance();
configParams.setContactlessTransactionListener(paymentCallback);

Last updated

Was this helpful?