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.

Manage default card

Overview

Set a default card before the end user can make a payment.

Only one card can be set as the default card at a time.

SDK

Set default card

D1PayWallet d1PayWallet = d1Task.getD1PayWallet();
String d1CardID = "";
d1PayWallet.setDefaultPaymentDigitalCard(
        d1CardID,
        new D1Task.Callback<Void>() {
            @Override
            public void onSuccess(Void ignored) { }

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

Get default card

If no default card is set, getDefaultPaymentDigitalCard returns null.

Unset default card

Last updated

Was this helpful?