# Get BIN data

Returns card BIN data for the card number or Worldpay token supplied.

Endpoint: POST /cardBin/panLookup
Version: 1
Security: BasicAuth

## Header parameters:

  - `WP-Api-Version` (integer, required)
    The API version.
    Example: 1

## Response 200 fields (application/json):

  - `type` (string)
    The type of account number provided.
    Enum: "pan", "networkToken"

  - `brand` (array)
    Brand of the card. For co-branded cards multiple brands are returned.
    Enum: "accel", "affn", "airplus", "allstar", "amex", "argencard", "ath", "aurore", "bc", "cabal", "carnet", "cartesBancaires", "cencosud", "coopeplus", "credimas", "culiance", "dankort", "diners", "discover", "eftposAU", "elo", "gecapital", "hana", "hipercard", "hyundai", "ikea", "interac", "interlink", "italcred", "jaywan", "jcb", "jeanie", "keyfuels", "kookmin", "lotte", "maestro", "mastercard", "naranja", "nativa", "ncp", "nevada", "newday", "nexo", "nonghyup", "nyce", "overdrive", "pavd", "pulse", "samsung", "sears", "shazam", "shinhan", "sorocred", "star", "starAccess", "supercharge", "tarjeta", "troy", "uatp", "unionPay", "visa"

  - `bin` (string)
    Bank Identification Number.
    Example: "444422"

  - `binLength` (integer)
    Length of the BIN.
    Example: 6

  - `fundingType` (string)
    Funding source of the card.
    Enum: "credit", "debit", "prepaid", "chargeCard", "deferredDebit", "unknown"

  - `issuerName` (string)
    Card issuer name.
    Example: "Bank of America"

  - `countryCode` (string)
    Card issuer country in ISO alpha-2 format or unknown.
    Example: "US"

  - `currency` (string)
    Currency of the card in ISO alpha-3 format.
    Example: "USD"

  - `dccAllowed` (boolean)
    Sets whether Dynamic Currency Conversion (DCC) is permitted.
    Example: true

  - `anonymousPrepaid` (string)
    Anonymous prepaid program and AMLD5 compliance.
    Enum: "anonymousNonCompliant", "anonymousCompliant", "notPrepaidOrNonAnonymous", "unknown"

  - `category` (string)
    The card category.
    Enum: "commercial", "consumer"

  - `multipleAccountAccess` (string)
    Participation in Visa multiple-account access. Managed cardholder choices are stored with Visa and self-serve with the issuer.
    Enum: "managed", "selfServe", "notParticipating", "notSupported"

## Response 400 fields (application/json):

  - `errorName` (string, required)
    A machine and human readable error type for clarity and semantic understanding of the error.
    Enum: "internalErrorOccurred", "headerIsMissing", "headerHasInvalidValue", "bodyIsEmpty", "bodyIsNotJson", "bodyDoesNotMatchSchema"

  - `message` (string, required)
    A human readable message giving a corrective action for the error.  This is not for machine consumption.
    Example: "A JSON body matching the expected schema must be provided."

  - `validationErrors` (array)
    If there were field validation errors, they will be collected in this array.

  - `validationErrors.errorName` (string, required)
    A machine and human readable error type for clarity and semantic understanding of the error.
    Enum: "fieldIsMissing", "fieldMustBeString", "fieldMustBeNumber", "fieldMustBeInteger", "fieldMustBeBoolean", "fieldMustBeObject", "fieldMustBeArray", "fieldIsNull", "fieldIsEmpty", "fieldHasInvalidValue", "fieldIsNotAllowed", "numberIsTooSmall", "integerIsTooLarge", "stringIsTooShort", "stringIsTooLong", "stringFailedRegexCheck", "panFailedLuhnCheck", "dateHasInvalidFormat"

  - `validationErrors.message` (string, required)
    A human readable message giving a corrective action for the error.  This is not for machine consumption.
    Example: "Field at path is not allowed."

  - `validationErrors.jsonPath` (string)
    This field represents the JSON path of the element within the request body associated with the error.
    Example: "$.transactionRef"

  - `headerName` (string)
    If the header is missing or does not contain an expected value, this field will be populated with the incorrect header name.
    Example: "Content-Type"

## Response 401 fields (application/json):

  - `errorName` (string, required)
    A machine and human readable error type for clarity and semantic understanding of the error.
    Example: "accessDenied"

  - `message` (string, required)
    A human readable message giving a corrective action for the error.  This is not for machine consumption.
    Example: "Access to the requested resource has been denied"

## Response 404 fields (application/json):

  - `errorName` (string, required)
    A machine and human readable error type for clarity and semantic understanding of the error.
    Enum: "tokenNotFound", "cardNotFound"

  - `message` (string, required)
    A human readable message giving a corrective action for the error.  This is not for machine consumption.
    Example: "The card number cannot be found in any BIN ranges."

## Response 415 fields (application/json):

  - `errorName` (string, required)
    A machine and human readable error type for clarity and semantic understanding of the error.
    Example: "headerHasInvalidValue"

  - `message` (string, required)
    A human readable message giving a corrective action for the error.  This is not for machine consumption.
    Example: "A valid header must be provided."

  - `headerName` (string)
    If the header is missing or does not contain an expected value, this field will be populated with the incorrect header name.
    Example: "Content-Type"

## Response 500 fields (application/json):

  - `errorName` (string, required)
    A machine and human readable error type for clarity and semantic understanding of the error.
    Enum: "internalServerError"

  - `message` (string, required)
    A human readable message giving a corrective action for the error.  This is not for machine consumption.
    Example: "An internal server error occurred"


