A card brand has a code and a name
BIN returns brand for application logic and brand_name for display. Keep the distinction when handling co-brands, missing values, and card prefixes.
American Express is a useful label to show in a table. amex is a useful value to compare in code. Asking one string to do both jobs makes each application maintain its own translation between a network key and a readable name.
The BIN API returns both. A BIN, also called an IIN, is the first digits of a card number. A lookup describes the recorded issuer and card information associated with that prefix. For the prefix 371449, the brand fields look like this response excerpt:
{
"brand": "amex",
"brand_name": "American Express"
}
Use brand when choosing an icon, grouping results, or comparing a value in application logic. Use brand_name when writing a label for someone to read. Turning amex into title case would give you "Amex", not the supplied display name. The difference is even clearer with unionpay and "China UnionPay".
Some records contain co-branded combinations. For example, the key troy/discover has the display name "Troy / Discover". Preserve the combination instead of taking the first part and silently losing the second. An interface that recognizes only a few networks can still show the returned name when it has no matching icon.
The fields can also be null. A known prefix does not guarantee that every piece of its metadata is known. Leave the brand unspecified in that case. An issuer name or a broader prefix is not a substitute for the missing brand on the matched record.
Send the prefix
The endpoint accepts 6 to 11 digits, with spaces and hyphens allowed. Keep the input as a string so leading zeros survive, and send only the prefix. Full card numbers are rejected.
The response's bin field is your normalized input. Its prefix field is the longest recorded prefix that matched. If you send eight digits and the match contains six, the result describes that broader six-digit record. The extra digits did not make the available information more specific.
That boundary applies to the brand as well as the other fields. A recorded network name does not establish that an individual card is valid or that a payment will be accepted. The BIN reference covers the matching behavior and nullable fields. brand_name gives the recorded brand a readable label, while brand gives your application a consistent key to use.