← Back to Gallery

Card Brand Detection

Card brand is detected in real-time as the user types via BIN prefix matching. The detected brand icon highlights while others dim to 30% opacity.

Visual States

No Input
All 4 brand icons at full opacity
Card number
VISA
AMEX
DISC
Typing "4242"
Visa highlighted, others dimmed (opacity 0.3)
4242
VISA
AMEX
DISC
Typing "5555"
Mastercard highlighted, others dimmed
5555
VISA
AMEX
DISC
Typing "3782"
Amex highlighted, others dimmed. CVC shows "4 digits"
3782
VISA
AMEX
DISC
CVC field shows "4 digits" placeholder (Amex uses 4-digit CVC)
Unknown Prefix
All icons dimmed
9999
VISA
AMEX
DISC

Formatting Differences

Visa / MC / Discover 4242 4242 4242 4242 4-4-4-4, 16 digits
Amex 3782 822463 10005 4-6-5, 15 digits

BIN Prefix Table

Brand Prefix Max Digits CVC Length
Visa 4 16 3
Mastercard 51-55, 2221-2720 16 3
Amex 34, 37 15 4
Discover 6011, 65, 644-649 16 3

Usage

// Brand detection is automatic — no config needed
<BlazeCheckout
  onEvent={(event) => {
    if (event.type === 'card_brand_detected') {
      console.log('Brand:', event.brand)
    }
  }}
  // ... other props
/>

Icon Styling