Set default payment card
Overview
SDK integration
func setDefaultCard(digitalCard: DigitalCard) async {
do {
_ = try await digitalCard.setDefault()
} catch {
// Handle errors.
}
}Last updated
Was this helpful?
The default digital card is the card your digital wallet application shows first during contactless payment.
The end user can keep the default digital card or switch cards from your UI before they confirm the payment.
For payment UX options, see Contactless payment.
Call DigitalCard.setDefault() on the DigitalCard you want to set as default.
The following example sets the default digital card:
func setDefaultCard(digitalCard: DigitalCard) async {
do {
_ = try await digitalCard.setDefault()
} catch {
// Handle errors.
}
}You can set a default digital card only when it is active.
The card must also have at least one payment key remaining.
Use the properties in Get card details to validate both.
Last updated
Was this helpful?
Was this helpful?