> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Cards for a Fingerprint

This call returns all the cards with the same `Fingerprint` value. This can be useful to detect abnormal or fraudulent behavior.

<a href="/guides/payment-methods/card/fingerprint" target="_blank" class="btn Tertiary normal">Learn more about card fingerprint →</a>

### Path parameters

<ParamField path="Fingerprint" type="string" required>
  The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200">
    <ResponseField name="Array (Cards)" type="array">
      The list of the cards created by the platform.

      <Expandable title="properties">
        <ResponseField name="Card" type="object">
          The card object created by the platform.

          <Expandable title="properties">
            <ResponseField name="ExpirationDate" type="string">
              Format: “MMYY”

              The expiration date of the card.
            </ResponseField>

            <ResponseField name="Alias" type="string">
              The card number, partially obfuscated.
            </ResponseField>

            <ResponseField name="CardType" type="string">
              **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`

              **Default value:** `CB_VISA_MASTERCARD`

              The type of the card. If not supplied, the default value will be taken into account.
            </ResponseField>

            <ResponseField name="CardProvider" type="string">
              **Allowed values:** `CB`, `VISA`, `MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`, `JCB`, `DISCOVER`

              The provider of the card.
            </ResponseField>

            <ResponseField name="Country" type="string">
              Format: ISO-3166-1 alpha-3 three-letter country code (e.g., “FRA”)

              The country of the card (which is the same as the country of the issuer).
            </ResponseField>

            <ResponseField name="BankCode" type="string">
              The name of the card issuing bank.
            </ResponseField>

            <ResponseField name="Active" type="boolean">
              Whether the card is active or not. Setting this parameter to `false` is irreversible and should be done once the pay-in is successful.
            </ResponseField>

            <ResponseField name="Currency" type="string">
              **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

              The currency of the card.
            </ResponseField>

            <ResponseField name="Validity" type="string">
              **Returned values:** `UNKNOWN`, `VALID`, `INVALID`

              Whether the card is valid or not.

              * `UNKNOWN` – No payment or card validation has been processed, so the validity of the card remains unknown.
              * `VALID` – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration.
              * `INVALID` – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was `CREATED` for more than 24 hours.\
                Once a card is set to `INVALID`, it cannot be set back to `VALID`. A new card registration will be necessary to make a payment.
            </ResponseField>

            <ResponseField name="UserId" type="string">
              The unique identifier of the user the card belongs to.
            </ResponseField>

            <ResponseField name="Id" type="string">
              The unique identifier of the Card object.
            </ResponseField>

            <ResponseField name="Tag" type="string">
              Custom data added to this object.\
              In the case of the Card object, the tag value is inherited from the Card Registration object and is not editable.
            </ResponseField>

            <ResponseField name="CreationDate" type="Unix timestamp">
              The date and time at which the object was created.
            </ResponseField>

            <ResponseField name="Fingerprint" type="string">
              The unique representation of the card number. This string can be used to track the card behavior while keeping the card information confidential.
            </ResponseField>

            <CardHolderNameResposne />
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json 200   theme={null}
  [
      {
          "ExpirationDate": "1229",
          "Alias": "497010XXXXXX8183",
          "CardType": "CB_VISA_MASTERCARD",
          "CardProvider": "VISA",
          "Country": "FRA",
          "Product": "I",
          "BankCode": "unknown",
          "Active": true,
          "Currency": "EUR",
          "Validity": "UNKNOWN",
          "UserId": "user_m_01HWQ0VWBTFSWCPF29SR3E7PK9",
          "Id": "card_m_01HXVF29TMRSTBRE11RY6EY6PT",
          "Tag": null,
          "CreationDate": 1715687466,
          "Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d",
          "CardHolderName": "Jody Smith"
      },
      {
          "ExpirationDate": "1229",
          "Alias": "497010XXXXXX8183",
          "CardType": "CB_VISA_MASTERCARD",
          "CardProvider": "VISA",
          "Country": "FRA",
          "Product": "I",
          "BankCode": "unknown",
          "Active": true,
          "Currency": "EUR",
          "Validity": "UNKNOWN",
          "UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T",
          "Id": "card_m_01HXVD91R8QEDY7MYC8TX9R9M8",
          "Tag": null,
          "CreationDate": 1715685590,
          "Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d",
          "CardHolderName": "Alex Smith"
      }
  ]
  ```
</ResponseExample>

<RequestExample>
  ```php PHP theme={null}
  <?php 

  require_once 'vendor/autoload.php';

  use MangoPay\MangoPayApi;
  use MangoPay\Libraries\ResponseException as MGPResponseException;
  use MangoPay\Libraries\Exception as MGPException;

  $api = new MangoPayApi();

  $api->Config->ClientId = 'your-client-id';
  $api->Config->ClientPassword = 'your-api-key';
  $api->Config->TemporaryFolder = 'tmp/';

  try {
      $fingerprint = '36c74d2e60ba474eab6d6f6d46a642b0';

      $response = $api->Cards->GetByFingerprint($fingerprint);

      print_r($response);
  } catch(MGPResponseException $e) {
      print_r($e);
  } catch(MGPException $e) {
      print_r($e);
  }  
  ```

  ```javascript NodeJS   theme={null}
  const mangopayInstance = require('mangopay4-nodejs-sdk')
  const mangopay = new mangopayInstance({
      clientId: 'your-client-id',
      clientApiKey: 'your-api-key',
  })

  let myCard = {
    fingerprint: '48d63bbcfc2c47fcbc19df35e47b2f8d',
  }

  const listCardsFingerprint = async (fingerprint) => {
    return await mangopay.Cards.getByFingerprint(fingerprint)
      .then((response) => {
        console.info(response)
        return response
      })
      .catch((err) => {
        console.log(err)
        return false
      })
  }

  listCardsFingerprint(myCard.fingerprint)  
  ```

  ```ruby Ruby   theme={null}
  require 'mangopay'

  MangoPay.configure do |client|
      client.preproduction = true
      client.client_id = 'your-client-id'
      client.client_apiKey = 'your-api-key'
      client.log_file = File.join(Dir.pwd, 'mangopay.log')
  end

  def listFingerprintCards(fingerprint)
      begin
          response = MangoPay::Card.get_by_fingerprint(fingerprint)
          puts response
          return response
      rescue MangoPay::ResponseError => error
          puts "Failed to fetch cards for fingerprint: #{error.message}"
          puts "Error details: #{error.details}"
          return false
      end
  end

  myCard = {
      Fingerprint: '36c74d2e60ba474eab6d6f6d46a642b0',
  }

  listFingerprintCards(myCard[:Fingerprint])  
  ```

  ```python Python   theme={null}
  from pprint import pprint
  import mangopay

  mangopay.client_id='your-client-id'
  mangopay.apikey='your-api-key'

  from mangopay.api import APIRequest
  handler = APIRequest(sandbox=True)

  from mangopay.resources import Card

  fingerprint = '48d63bbcfc2c47fcbc19df35e47b2f8d'

  cards = Card.get_by_fingerprint(fingerprint)

  for card in cards:
      pprint(vars(card))  
  ```

  ```csharp .NET  theme={null}
  using MangoPay.SDK;
  using Newtonsoft.Json;

  class Program
  {
      static async Task Main(string[] args)
      {
          MangoPayApi api = new MangoPayApi();

          api.Config.ClientId = "your-client-id";
          api.Config.ClientPassword = "your-api-key";

          var fingerprint = "48d63bbcfc2c47fcbc19df35e47b2f8d";

          var userCards = await api.Cards.GetCardsByFingerprintAsync(fingerprint, null, null);

          string prettyPrint = JsonConvert.SerializeObject(userCards, Formatting.Indented);
          Console.WriteLine(prettyPrint);
      }
  }
  ```
</RequestExample>
