Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Replenish ODA

Overview

Offline Data Authentication (ODA) is supported in the D1 SDK module. It is a mechanism to authenticate the end user during transit at the gates. For example, during usage of digitized card to pay at the gates of public transport stations.

In order to complete a Visa transaction which requires ODA, the issuer application must check the expiry date of Visa ODA certificate as described in the following sections.

To support this use case, two methods are available:

  • isOdaReplenishmentNeeded() to check if ODA is needed. For more information, refer to Digital Card List

  • replenishODA() to request for ODA replenishment.

This use case is to be implemented during the issuer application startup flow after D1 Pay SDK initialization and before attempting to show the list of all the cards.

SDK

The code snippet below highlights the Visa ODA Replenishment.

D1PayWallet d1PayWallet = d1Task.getD1PayWallet();
String d1CardID = "";
D1PayDigitalCard[] dCards = new D1PayDigitalCard[]{ null };
d1PayWallet.getDigitalCard(d1CardID,
    new D1Task.Callback<D1PayDigitalCard>() {
        @Override
        public void onSuccess(@NonNull D1PayDigitalCard digitalCard) {
            dCards[0] = digitalCard;
        }

        @Override
        public void onError(@NonNull D1Exception exception) {
            ///Refer to D1 SDK Integration – Error Management section
        }
    }
);
// wait for the getDigitalCard to complete

D1PayDigitalCard d1PayDigitalCard = dCards[0];
if (d1PayDigitalCard.isODAReplenishmentNeeded()) {
    d1PayWallet.replenishODA(d1CardID,
        new D1Task.Callback<Void>() {
            @Override
            public void onSuccess(Void data) {
                // VISA ODA Replenishment Success
            }

            @Override
            public void onError(@NonNull D1Exception exception) {
                // Refer to D1 SDK Integration – Error Management section
            }
        }
    );
}

Last updated

Was this helpful?