Recipe
- Web
- Android
- iOS
How it works
- Web
- Android
- iOS
- Listen for the
primer:bin-data-availableevent - Use
preferred.networkto get the card brand identifier - Update your UI with the appropriate logo or icon
preferred field contains the recommended card network based on orderedAllowedCardNetworks. It is undefined when no network is detected (e.g., empty input or insufficient digits).
The preferred object
- Web
- Android
- iOS
The
preferred object contains the detected card network and, when status is 'complete', additional issuer details:See the Events Reference for the full
BinDataDetails type definition.Supported card networks
network | Web / Android displayName | iOS displayName |
|---|---|---|
VISA | Visa | Visa |
MASTERCARD | Mastercard | Mastercard |
AMEX | American Express | American Express |
DISCOVER | Discover | Discover |
DINERS_CLUB | Diners Club | Diners |
JCB | JCB | JCB |
MAESTRO | Maestro | Maestro |
UNIONPAY | UnionPay | UnionPay |
ELO | Elo | Elo |
HIPER | Hiper | Hiper |
HIPERCARD | Hipercard | Hiper |
MIR | Mir | Mir |
CARTES_BANCAIRES | Cartes Bancaires | Cartes Bancaires |
BANCONTACT | — | Bancontact |
DANKORT | Dankort | — (not in iOS CardNetwork) |
EFTPOS | Eftpos | EFTPOS |
OTHER | Other | Unknown |
On Android, these are values of the
CardNetwork.Type enum, each with a displayName property. On iOS, the network raw values map to cases of the CardNetwork enum; a few display names and the supported set differ (iOS has no DANKORT and adds BANCONTACT). See PrimerCardNetwork for the authoritative iOS list.Variations
Show a loading indicator
Useprimer:bin-data-loading-change to indicate when BIN data is being fetched:
Display card network name
- Web
- Android
- iOS
For user-facing text, use
displayName instead of network:Show/hide based on detection
- Web
- Android
- iOS
Co-badge network selector
- Web
- Android
- iOS
Some cards support multiple networks (e.g., Carte Bancaire / Visa). Use
alternatives to offer a network picker:Use icon font or CSS classes
See also
Build a custom card form
Step-by-step guide to building a fully custom card form
Events guide
Handle payment lifecycle events
Use BIN data for Click to Pay
Control Click to Pay based on BIN data