CheckoutPayments

Get the brands and other details of a card

POST
/cardDetails

Use this endpoint to get information about the card or network token that enables you to decide on the routing of the transaction and the eligibility of the card for the type of transaction.

If you include your supported brands in the request, the response also tells you if you support each brand that was identified on the card.

If you have an API-only integration and collect card data, use this endpoint to find out if the shopper's card is co-bad. For co-badged cards, you must let the shopper choose the brand to pay with if you support both brands.

Server-side API libraries

We provide open-source server-side API libraries in several languages:

  • PHP
  • Java
  • Node.js
  • .NET
  • Go
  • Python
  • Ruby
  • Apex (beta)

See our integration examples for example uses of the libraries.

Developer resources

BIN Lookup API is available through a Postman collection. Click the button below to create a fork, then set the environment variables at Environments > Adyen APIs.

Run in Postman

Authorization

AuthorizationBasic <token>

In: header

Header Parameters

Idempotency-Key?string

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request Body

application/json

cardNumber?string

A minimum of the first six digits of the card number. The full card number gives the best result.

You must be fully PCI compliant to collect raw card data. Alternatively, you can use the encryptedCardNumber field.

countryCode?string

The shopper country.

Format: ISO 3166-1 alpha-2 Example: NL or DE

encryptedCardNumber?string

The encrypted card number.

Lengthlength <= 15000
merchantAccount*string

The merchant account identifier, with which you want to process the transaction.

supportedBrands?array<string>

The card brands you support. This is the brands array from your /paymentMethods response.

If not included, our API uses the ones configured for your merchant account and, if provided, the country code.

Response Body

application/json

curl -X POST "https://example.com/cardDetails" \  -H "Idempotency-Key: 37ca9c97-d1d1-4c62-89e8-706891a563ed" \  -H "Content-Type: application/json" \  -d '{    "merchantAccount": "YOUR_MERCHANT_ACCOUNT",    "cardNumber": "411111"  }'

Example response when the card is co-branded.

{  "brands": [    {      "type": "visa",      "supported": true    },    {      "type": "cartebancaire",      "supported": true    }  ],  "fundingSource": "CREDIT",  "isCardCommercial": false,  "issuingCountryCode": "FR"}