Example of displaying supported card networks
Choice of payment brand
orderedAllowedCardNetworks
in the API Reference.onCardNetworksChange
.source
LOCAL
if the card networks come from the SDK, usually by leveraging the first few digits.REMOTE
if the card networks come from Primer’s serverLOCAL_FALLBACK
if Primer’s server fails to be reached. This works similarly to LOCAL
.detectedCardNetworks.items
detectedCardNetworks.preferred
undefined
if the user entered a card that is not allowed.selectableCardNetworks.items
selectableCardNetworks
is undefined
if Headless Checkout does not detect a co-badged card.selectableCardNetworks.preferred
orderedAllowedCardNetworks
. selectableCardNetworks
is undefined
if Headless Checkout does not detect a co-badged card.onCardNetworksChange
are objects that contain the network id, its display name, and a flag allowed
stating if the card network is in orderedAllowedCardNetworks
.onCardNetworksChange
in the API reference.source
is set to LOCAL
detectedCardNetworks.preferred
contains the card network you should present to the userdetectedCardNetworks.items
contains all the detected card networksselectableCardNetworks
is always undefined
source
is set to REMOTE
selectableCardNetworks
is only available if the user has entered a co-badged card and both its detected networks are allowed for this session
selectableCardNetworks.items
contains the list of card networks from which the user can selectsource
is set to LOCAL_FALLBACK
.orderedAllowedCardNetworks
is ["CARTES_BANCAIRES", "VISA", "MASTERCARD"]
If the user enters a card that is co-badged Visa and Cartes Bancaires:detectedCardNetworks.items
is CARTES_BANCAIRES
and VISA
detectedCardNetworks.preferred
is CARTES_BANCAIRES
selectableCardNetworks.items
is CARTES_BANCAIRES
and VISA
selectableCardNetworks.preferred
is CARTES_BANCAIRES
detectedCardNetworks.items
is only VISA
detectedCardNetworks.preferred
is VISA
selectableCardNetworks
is undefined
detectedCardNetworks.items
is only AMEX
detectedCardNetworks.preferred
is undefined
selectableCardNetworks
is undefined
AssetsManager
.getCardNetworkAsset
in the API Reference.submit
function with the selected card network to let us know which card network the customer chose.cardNetwork
is not present, Primer follows the order of preference given by the option orderedAllowedCardNetworks
passed in the client session API.orderedAllowedCardNetworks
on the Web SDK by listening to onClientSessionUpdate
. After that, you can useonClientSessionUpdate
in the API Reference.paymentMethodData.network
.
paymentMethodData.binData.network
as it only contains the international card network.