When a customer starts typing their card number, Primer can surface enriched BIN data in the frontend.This includes network details, issuer information such as the country or the bank, or funding type like DEBIT, CREDIT, PREPAID, or DEFERRED_DEBIT. You can use this information to adapt your checkout UI early, before a payment is created.In this guide, you will build a concrete example: block Click to Pay when the selected card network is prepaid, while handling co-badged cards correctly.
true when BIN lookup starts, false when it completes
Copy
Ask AI
const checkout = document.querySelector('primer-checkout');checkout.addEventListener('primer:bin-data-loading-change', (event) => { const { loading } = event.detail; // Use loading to disable buttons or show a loader});
Use this event to read BIN data once it is available.
Property
Type
Description
preferred
BinDataDetails | undefined
Recommended network
alternatives
BinDataDetails[]
Other detected networks
status
"partial" | "complete"
Data completeness
firstDigits
string | undefined
BIN prefix
status = "partial" means local detection only. status = "complete" means enriched BIN data is available, typically after 8 digits.
Only make decisions when status === "complete".
Do not block the entire card just because one of the networks is PREPAID.
Block only the network where accountFundingType === "PREPAID", and keep other valid networks available.