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.

Set the default payment card

Overview

The default digital card is the card your digital wallet application selects automatically for contactless payments.

The end user can keep the default digital card or switch cards in your UI before confirming the payment.

See Implement contactless payments.

SDK integration

Set the default payment card

Call DigitalizedCard.setDefault() on the DigitalizedCard you want to set as the default.

The example below sets the default digital card for contactless payments.

SetDefaultCard.java
public void setDefault(final DigitalizedCard digitalizedCard) {
    digitalizedCard.setDefault(
        PaymentType.CONTACTLESS,
        new AsyncHandlerVoid(new AsyncHandlerVoid.Delegate() {
            @Override
            public void onSuccess() {
                // Default card successfully set.
            }

            @Override
            public void onError(final String error) {
                // TODO: handle error
            }
        })
    );
}

DigitalizedCardManager for default card management

DigitalizedCardManager provides additional APIs for default card management:

  • DigitalizedCardManager.getDefault(): Retrieve the tokenized card ID for the default card.

  • DigitalizedCardManager.unsetDefaultCard(): Unset the current default card. After that, no card is selected by default.

Last updated

Was this helpful?