Skip to main content
Primer Checkout Android SDK is currently in beta (v3.0.0-beta.2). The API is subject to change before the stable release.
Represents a card network option for co-badged card selection. Exposed through PrimerCardFormController.State.networkSelection.

Definition

data class PrimerCardNetwork(
    val network: CardNetwork.Type,
    val displayName: String,
    val allowed: Boolean,
)

Properties

PropertyTypeDescription
networkCardNetwork.TypeThe card network type
displayNameStringHuman-readable network name (e.g., "Visa", "Mastercard")
allowedBooleanWhether this network is allowed for the current transaction

CardNetwork.Type

enum class CardNetwork.Type {
    OTHER, VISA, MASTERCARD, AMEX, DINERS_CLUB, DISCOVER,
    JCB, UNIONPAY, MAESTRO, ELO, MIR, HIPER, HIPERCARD,
    CARTES_BANCAIRES, DANKORT, EFTPOS,
}
ValueDisplay Name
VISAVisa
MASTERCARDMastercard
AMEXAmerican Express
DINERS_CLUBDiners Club
DISCOVERDiscover
JCBJCB
UNIONPAYUnionPay
MAESTROMaestro
ELOElo
MIRMir
HIPERHiper
HIPERCARDHipercard
CARTES_BANCAIRESCartes Bancaires
DANKORTDankort
EFTPOSeftpos
OTHERUnknown
Each enum value also has a displayName property.

Co-badged card selection

When a card supports multiple networks (e.g., Visa + Cartes Bancaires), the card form exposes network selection through the controller state:
val cardFormController = rememberCardFormController(checkout)
val state by cardFormController.state.collectAsStateWithLifecycle()

val selection = state.networkSelection
selection.availableNetworks   // List<PrimerCardNetwork>
selection.selectedNetwork     // PrimerCardNetwork?
selection.isNetworkSelectable // Boolean

cardFormController.selectCardNetwork(network)
PropertyTypeDescription
availableNetworksList<PrimerCardNetwork>Networks available for the entered card number
selectedNetworkPrimerCardNetwork?Currently selected network, or null if auto-detected
isNetworkSelectableBooleantrue when the user must choose between multiple networks
See PrimerCardFormController for full card form API.