# Get BIN data

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

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

## Security:

  - `BasicAuth` (unknown)
    http basic

## Header parameters:

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

## Request body:

  - `application/json` (unknown)
    Lookup details.

## Request fields (application/json):

  - `merchant` (object, required)
    An object that contains information about the merchant.

  - `merchant.entity` (string, required)
    Used to route the request in Access Worldpay, created as part of on-boarding.
    Example: default

  - `cardNumber` (string, required)
    Primary Account Number (PAN) and Network Token Number are accepted.
    Example: 4444333322221111

  - `token` (string, required)
    Worldpay token href
    Example: https://try.access.worldpay-bsh.securedataplatform.co.uk/tokens/eyJrIjoxLCJkIjoialRBL0FFelBzcnZpNCtzRGNRemh0NzI0NE1rdUtjMUFJdjYxVnlibWZuUT0ifQ

## Request examples:

  - `cardNumber` (unknown)

  - `token` (unknown)

## Response 200:

  - `200` (unknown)
    Request Successful

## 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.
    Example: ["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 200 headers (application/json):

  - `WP-CorrelationId` (string)
    Generated identifier for the request and response. When contacting support please include this.
    Example: 4c195ce9-3dbd-4bc8-9c94-3d3393842323

  - `WP-Api-Version` (string)
    The complete API Version is returned in the WP-Api-Version HPP Header. It contains the Major, Minor and Patch details of API Version.
    Example: 1.1.20240411

## Response 400:

  - `400` (unknown)
    Bad Request

## 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 400 headers (application/json):

  - `WP-CorrelationId` (string)
    Generated identifier for the request and response. When contacting support please include this.
    Example: 4c195ce9-3dbd-4bc8-9c94-3d3393842323

  - `WP-Api-Version` (string)
    The complete API Version is returned in the WP-Api-Version HPP Header. It contains the Major, Minor and Patch details of API Version.
    Example: 1.1.20240411

## Response 401:

  - `401` (unknown)
    Client is not authorized due to missing or invalid Authorization header.

## 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 401 headers (application/json):

  - `WP-CorrelationId` (string)
    Generated identifier for the request and response. When contacting support please include this.
    Example: 4c195ce9-3dbd-4bc8-9c94-3d3393842323

## Response 404:

  - `404` (unknown)
    Not Found

## 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 404 headers (application/json):

  - `WP-CorrelationId` (string)
    Generated identifier for the request and response. When contacting support please include this.
    Example: 4c195ce9-3dbd-4bc8-9c94-3d3393842323

  - `WP-Api-Version` (string)
    The complete API Version is returned in the WP-Api-Version HPP Header. It contains the Major, Minor and Patch details of API Version.
    Example: 1.1.20240411

## Response 415:

  - `415` (unknown)
    Invalid content-type HTTP header

## 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 415 headers (application/json):

  - `WP-CorrelationId` (string)
    Generated identifier for the request and response. When contacting support please include this.
    Example: 4c195ce9-3dbd-4bc8-9c94-3d3393842323

  - `WP-Api-Version` (string)
    The complete API Version is returned in the WP-Api-Version HPP Header. It contains the Major, Minor and Patch details of API Version.
    Example: 1.1.20240411

## Response 500:

  - `500` (unknown)
    An error occurred processing the request on our side.

## 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

## Response 500 headers (application/json):

  - `WP-CorrelationId` (string)
    Generated identifier for the request and response. When contacting support please include this.
    Example: 4c195ce9-3dbd-4bc8-9c94-3d3393842323

  - `WP-Api-Version` (string)
    The complete API Version is returned in the WP-Api-Version HPP Header. It contains the Major, Minor and Patch details of API Version.
    Example: 1.1.20240411

## Response 200 examples:

  - `cardNumber` (unknown)

  - `token` (unknown)

## Response 400 examples:

  - `Validation Error` (unknown)

  - `Header Error` (unknown)

## Response 404 examples:

  - `Token Not Found` (unknown)

  - `Card Not Found` (unknown)

