PrimerCardNetwork represents a single card network (card scheme) detected from a card number, together with the display information needed to render it. It is the model used in co-badged card scenarios — when one physical card carries more than one network (for example Cartes Bancaires + Visa) and the shopper, or your UI, must choose which network to route the payment through.
You read PrimerCardNetwork values from PrimerCardFormState (availableNetworks, selectedNetwork, and the BIN metadata in binData.preferred / binData.alternatives) and commit a choice with PrimerCardFormSession.selectCardNetwork(_:).
Definition
You never construct
PrimerCardNetwork yourself. The SDK detects networks from the entered card number and publishes them on PrimerCardFormState.availableNetworks. Use those instances directly when calling selectCardNetwork(_:).Properties
displayName, network, allowed, and allowsUserSelection are the properties you need for co-badge selection. The other String? properties hold issuer/BIN metadata. They are always nil on the instances in availableNetworks and selectedNetwork. They are filled only on the instances in PrimerCardFormState.binData (preferred and alternatives) after a remote BIN lookup (binData.status == .complete). Read issuer details from there.CardNetwork
network is a CardNetwork — a String-backed enum identifying the scheme. Its raw value matches the network’s canonical uppercase identifier.
The source declaration also conforms to
LogReporter, an SDK logging marker protocol that is not meant for merchant use; it is omitted here.
The enum exposes these public members:
Co-badged card selection
When the entered card number resolves to more than one network, the card form publishes those options onPrimerCardFormState. Read them inside any PrimerCardForm slot through the injected PrimerCardFormSession:
To commit a choice, pass one of the
availableNetworks instances to the session:
Building a custom selector
Render only networks where
allowsUserSelection is true (and that are allowed). Networks that auto-route — such as EFTPOS — are resolved by the SDK and should not appear as a manual choice.Using the built-in selector
If you don’t need a fully custom picker, the SDK ships a ready-made selector inside the card number field. Both the defaultcardDetails section and the CardFormDefaults.cardNumber(_:) building block show it automatically when a co-badged card is detected. When one of the networks disallows shopper selection (for example EFTPOS), the field shows both network badges and offers no choice. CardFormDefaults.cardNetwork(_:) is a standalone dropdown for layouts that do not use CardFormDefaults.cardNumber(_:). It renders only when availableNetworks.count > 1 and calls selectCardNetwork(_:) for you. Do not combine it with CardFormDefaults.cardNumber(_:) or the full cardDetails section, or two selectors appear. See Card field components.
See also
Card Form Session
State, network selection, and submission for the card form.
Card field components
The built-in co-badge selector and other per-field building blocks.
PrimerCardForm
The card form view and its slots.