Cards & Wallets · Common features · Card Info library

From a server

This page describes the server-side interface that you can call to get card information for a full PAN. If you need to apply any policy based on card information, such as a surcharge, base that decision on information from this endpoint rather than information from the customer’s browser or mobile device.

Get card information from your server

Send POST /acceptor/rest/cardinfo/{instId} using your API credentials, with your installation ID in the path and the full PAN in the request body. The PAN must be 13 to 19 digits.

The response identifies known details such as the card type, usage type, scheme, category, issuer, and issuer country. Details that cannot be determined are omitted. Check valid and status before using the card attributes; reasonCode and reasonMessage provide further outcome or error information.

See the complete request and response definition in the Find card information by PAN endpoint under Cards & Wallets API Endpoints.

Card information retrieval
EndpointDefinition
POST /acceptor/rest/cardinfo/{instId}
Request body
{
  "pan": "9900000000000010"
}
cURL
curl -X POST "{targetEnvironmentPath}/acceptor/rest/cardinfo/{instId}" \
  -u "{apiUser}:{apiPassword}" \
  -H "Content-Type: application/json" \
  -d '{
  "pan": "9900000000000010"
}'
Response
HTTP/1.1 200 OK

{
  "cardType": "VISA_DEBIT",
  "cardUsageType": "DEBIT",
  "cardScheme": "VISA",
  "issuer": "DATACASH",
  "issuerCountry": "GBR",
  "moreData": false,
  "valid": true,
  "status": "SUCCESS",
  "reasonCode": "S00",
  "reasonMessage": "Authorised"
}
Notes:
  • Base any policy decision, such as a surcharge, on this response rather than on card information obtained in the customer's browser or on their device.
  • Fields we could not determine are absent rather than null, so read valid and status before the card attributes.
  • moreData is only meaningful when valid is true; it says whether more digits of the PAN would yield more information.