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

# View a Card Validation

### Path parameters

<ParamField path="CardId" type="string" required>
  The unique identifier of the Card object, obtained during the card registration process.
</ParamField>

<ParamField path="ValidationId" type="string">
  The unique identifier of the Card Validation object.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200 - Response parameters">
    <ResponseField name="Id" type="string">
      Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)

      The unique identifier of the object.
    </ResponseField>

    <ResponseField name="AuthorId" type="string">
      The unique identifier of the user at the source of the transaction.
    </ResponseField>

    <ResponseField name="Status" type="string">
      **Returned values:** `CREATED`, `SUCCEEDED`, `FAILED`

      The status of the transaction.
    </ResponseField>

    <ResponseField name="SecureModeReturnURL" type="string">
      Max. length: 255 characters

      The URL to which users are automatically returned after 3DS2 if it is triggered (i.e., if the `SecureModeNeeded` parameter is set to `true`).
    </ResponseField>

    <ResponseField name="SecureModeRedirectURL" type="string">
      Max. length: 255 characters

      The URL to which to redirect the user to proceed to 3DS2 validation.
    </ResponseField>

    <ResponseField name="SecureModeNeeded" type="boolean">
      Whether or not the `SecureMode` was used.
    </ResponseField>

    <ResponseField name="IpAddress" type="string">
      The IP address of the end user initiating the transaction, in IPV4 or IPV6 format.
    </ResponseField>

    <ResponseField name="BrowserInfo" type="object">
      Information about the browser used by the end user (author) to perform the payment.

      <Expandable title="properties">
        <ResponseField name="AcceptHeader" type="string">
          The exact content of the HTTP accept headers as sent to the platform from the end user’s browser.
        </ResponseField>

        <ResponseField name="JavaEnabled" type="boolean">
          Whether or not the end user’s browser has the ability to execute Java.
        </ResponseField>

        <ResponseField name="Language" type="string">
          Format: Two-letter language code (ISO 639-1 alpha-2) followed by two-letter country code (ISO 3166-1 alpha-2), separated by a hyphen (example: `en-US`; pattern:`^[a-zA-Z]{2}(-[a-zA-Z]{2})?$`)

          The language of the browser.
        </ResponseField>

        <ResponseField name="ColorDepth" type="integer">
          The value representing the depth of the screen’s color palette for displaying images, in bits per pixel.
        </ResponseField>

        <ResponseField name="ScreenHeight" type="integer">
          Max. length: 6 characters

          The height of the screen in pixels.
        </ResponseField>

        <ResponseField name="ScreenWidth" type="integer">
          Max. length: 6 characters

          The width of the screen in pixels.
        </ResponseField>

        <ResponseField name="TimeZoneOffset" type="integer">
          The difference in minutes between the browser’s timezone and UTC.
        </ResponseField>

        <ResponseField name="UserAgent" type="string">
          Max. length: 255 characters

          The exact content of the HTTP User-Agent header.
        </ResponseField>

        <ResponseField name="JavascriptEnabled" type="boolean">
          Whether or not the end user’s browser has the ability to execute JavaScript.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="PreferredCardNetwork" type="string">
      **Returned values:** `VISA`, `MASTERCARD`, `CB`, `MAESTRO`

      The card network to use, as chosen by the cardholder, in case of <a href="/guides/payment-methods/card/co-branded">co-branded cards</a>.
    </ResponseField>

    <PaymentCategoryResponse />

    <ResponseField name="SecureMode" type="string">
      **Default value:** DEFAULT\
      **Allowed values:** DEFAULT, FORCE, NO\_CHOICE

      The mode applied for the [3DS protocol](/guides/payment-methods/card/3ds) for CB, Visa, and Mastercard. The options are:

      * `DEFAULT` – Requests an exemption to strong customer authentication (SCA), and thus a frictionless payment experience, if allowed by your Mangopay contract and accepted by the issuer.
      * `FORCE` – Requests SCA.
      * `NO_CHOICE` – Leaves the choice to the issuer whether to allow for a frictionless payment experience or to enforce SCA.

      *Note: Sending the FORCE value automatically sets the ValidationUsage value to MIT.*
    </ResponseField>

    <ResponseField name="ValidationUsage" type="string">
      **Default value:** MIT\
      **Allowed values:** MIT, CIT

      Indicates the intended usage of the card:

      * CIT – For customer-initiated transactions (CITs), meaning 3DS is less likely to be required on the card validation.
      * MIT – For merchant-initiated transactions (MITs), meaning 3DS is more likely to be required on the card validation.

      *Note: The MIT value is returned automatically if the SecureMode value is FORCE, even if CIT is sent.*
    </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="CreationDate" type="Unix timestamp">
      The date and time at which the object was created.
    </ResponseField>

    <ResponseField name="Type" type="string">
      **Returned values:** `CARD_VALIDATION`

      The type of the card validation.
    </ResponseField>

    <ResponseField name="Applied3DSVersion" type="string | null">
      **Returned values:** `V1`, `V2_1`

      The 3DS protocol version applied to the transaction.
    </ResponseField>

    <ResponseField name="ResultCode" type="string">
      The code indicating the result of the operation. This information is mostly used to <a href="/errors/codes">handle errors</a> or for filtering purposes.
    </ResponseField>

    <ResponseField name="ResultMessage" type="string">
      The explanation of the result code.
    </ResponseField>

    <ResponseField name="Tag" type="string">
      Max. length: 255 characters

      Custom data that you can add to this object.\
      For transactions (pay-in, transfer, payout), you can use this parameter to identify corresponding information regarding the user, transaction, or payment methods on your platform.
    </ResponseField>

    <ResponseField name="CardInfo" type="string">
      Information about the card used for the transaction.

      If the information or data is not available, `null` is returned.

      <Expandable title="properties">
        <ResponseField name="BIN" type="string">
          The 6-digit bank identification number (BIN) of the card issuer.
        </ResponseField>

        <ResponseField name="IssuingBank" type="string">
          The name of the card issuer.
        </ResponseField>

        <ResponseField name="IssuerCountryCode" type="string">
          Format: Two-letter country code ([ISO 3166-1 alpha-2 format](/api-reference/overview/data-formats))

          The country where the card was issued.
        </ResponseField>

        <ResponseField name="Type" type="string">
          **Returned values:** `DEBIT`, `CREDIT`, `CHARGE CARD`.

          The type of card product.
        </ResponseField>

        <ResponseField name="Brand" type="string">
          The card brand. Examples include: `AMERICAN EXPRESS`, `DISCOVER`, `JCB`, `MASTERCARD`, `VISA`, etc.

          **Note:** The possible returned values are numerous and liable to evolve over time.
        </ResponseField>

        <ResponseField name="SubType" type="string">
          The subtype of the card product. Examples include: `CLASSIC`, `GOLD`, `PLATINUM`, `PREPAID`, etc.

          **Note:** The possible returned values are numerous and liable to evolve over time.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="AuthenticationResult" type="object | null" defaultOpen>
      Information about the authentication result, based on the request made by Mangopay and the decision of the issuer regarding the type of authentication to be enforced (if applicable).

      <Expandable title="properties">
        <ResponseField name="AuthenticationType" type="string | null">
          Response values: `CHALLENGE`, `FRICTIONLESS`, `DIRECT_AUTHORIZATION`

          The type of authentication:

          * `CHALLENGE` – The issuer requested SCA to be enforced (for example, using 3DS).
          * `FRICTIONLESS` – The transaction was exempted from SCA because an exemption was granted by the issuer.
          * `DIRECT_AUTHORIZATION` – The transaction was sent to the issuer for authorization without any frictionless or challenge (for example, if SCA doesn't apply).

          A `null` value typically indicates that authentication was not requested (for example, because the request failed before being sent) or a decision was not received.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json 200 - Succeeded   theme={null}
  {
      "Id": "wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
      "AuthorId": "user_m_01KHRMAQT1ZPVBWK2KYM6S0N7M",
      "Status": "SUCCEEDED",
      "SecureModeReturnURL": "http://example.com?cardValidationId=wt_b7f55dd5-d699-46da-8c43-51c166e116f9",
      "SecureModeRedirectURL": null,
      "SecureModeNeeded": true,
      "IpAddress": "466b:ed49:0966:f7fe:1e09:d7de:4e24:b612",
      "BrowserInfo": {
          "AcceptHeader": "application/json,text/javascript,*/*;q=0.01<",
          "JavaEnabled": true,
          "Language": "fr",
          "ColorDepth": 32,
          "ScreenHeight": 667,
          "ScreenWidth": 375,
          "TimeZoneOffset": -120,
          "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
          "JavascriptEnabled": true
      },
      "PreferredCardNetwork": null,
      "SecureMode": "DEFAULT",
      "PaymentCategory": "ECommerce",
      "Type": "CARD_VALIDATION",
      "SecurityInfo": {
          "AVSResult": "NO_CHECK"
      },
      "ValidationUsage": "MIT",
      "Validity": "VALID",
      "CreationDate": 1771580513,
      "Applied3DSVersion": "V2_1",
      "ResultCode": "000000",
      "ResultMessage": "Success",
      "Tag": "Created using the Mangopay API Postman collection",
      "CardInfo": {
          "BIN": "497010",
          "IssuingBank": "LA BANQUE POSTALE",
          "IssuerCountryCode": "MA",
          "Type": "CREDIT",
          "SubType": null,
          "Brand": "VISA"
      },
      "AuthenticationResult": {
          "AuthenticationType": "CHALLENGE"
      }
  }
  ```
</ResponseExample>

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

  let myCard = {
    Id: 'card_m_01HRAB5X7K39MDNS5NV6DD68G8'
  }

  let myCardValidation = {
    Id: '5b0ab172-e1fd-47d7-a1f8-d674986630d2'
  }

    const viewCardValidation = async (cardValidationId) => {
      return await mangopay.Cards.getCardValidation(myCard.Id, cardValidationId) 
        .then((response) => {
          console.info(response)
          return response
        })
        .catch((err) => {
          console.log(err)
          return false
        })
    }
    
    viewCardValidation(myCardValidation.Id)  
  ```

  ```java Java  theme={null}
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  import com.mangopay.MangoPayApi;
  import com.mangopay.entities.CardValidation;

  public class ViewCardValidation {
      public static void main(String[] args) throws Exception {
          MangoPayApi mangopay = new MangoPayApi();
          mangopay.getConfig().setClientId("your-client-id");
          mangopay.getConfig().setClientPassword("your-api-key");
          
          String cardId = "card_m_01HY0MA4E2WQ0NRYQJP8X8SXMB";
          String cardValidationId = "68230c33-fcf7-486a-9275-74c9e6064968";

          CardValidation viewCardValidation = mangopay.getCardApi().getCardValidation(cardId, cardValidationId);

          Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create();
          String prettyJson = prettyPrint.toJson(viewCardValidation);

          System.out.println(prettyJson);
      }
  }
  ```

  ```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 cardId = "card_m_01J3049JBA2XPA7GC7GEFJRQG4";
          var cardValidationId = "a5309b17-0455-45cb-9f94-061784604bd3";

          var viewCardValidation = await api.Cards.GetCardValidationAsync(cardId, cardValidationId);

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