# initializeAuthentication

> Use this API to obtain the link to collect device and browser information in advance in 3D transactions.

`POST /v1/customer/initializeAuthentication`

Use this API to obtain the link to collect device and browser information in advance in 3D transactions.

# Structure

A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see： 

-   [Request header](https://docs.antom.com/ac/ams/api_fund.md#ML5ur)
-   [Response header](https://docs.antom.com/ac/ams/api_fund.md#WWH90)

**Note**: Set the data type of each field (except array) as String. This means that you must use double quotation marks (" ") to enclose the field value. Examples:

-   If the data type of a field is Integer and its value is 20, set it as "20". 
-   If the data type of a field is Boolean and its value is `true`, set it as "true".

## Request parameters

#### authenticationRequestId (String, REQUIRED)

The unique ID to identify an authentication request.

More information:

- Maximum length: 64 characters

#### identityType (String, REQUIRED)

Identity type. Valid values are:

-   `CARD_PAN`: The buyer pays via card number.
-   `CARD_NT`: The buyer pays using network token.
-   `CARD_TOKEN`: The buyer pays using card token provided by Antom.

#### authenticationType (String, REQUIRED)

Authentication type. The value is fixed as `THREEDS`.

#### identityValue (IdentityValue)

Identity value.

##### cardToken (String)

The token of the card.

Specify this parameter when the value of _identityType_ is `CARD_TOKEN`.

##### cardBin (String)

The first six digitals of the card number.

Specify this parameter when the value of _identityType_ is `CARD_PAN` or `CARD_NT`.

##### cardBrand (String)

Card brand. See the [Card brand list](https://docs.antom.com/ac/pm/enumeration_values.md#ZfyuE) to check the valid values.

Specify this parameter when the value of _identityType_ is `CARD_PAN` or `CARD_NT`.

##### funding (String)

The funding type of the card. Valid values are:

-   `C`: indicates a credit card.
-   `D`: indicates a debit card.

Specify this parameter when the value of _identityType_ is `CARD_PAN` or `CARD_NT`.

##### issuerName (String)

The issuing bank.

##### issuingCountry (String)

The issuing country of the card. The value of this parameter is a 2-letter country code that follows [ISO 3166 Country Codes](https://www.iso.org/obp/ui/#search) standard.

## Response parameters

#### authenticationId (String)

The unique ID to identify an authentication.

#### authenticationRequestId (String)

The unique ID to identify an authentication request.

More information:

- Maximum length: 64 characters

#### redirectActionForm (ActionForm)

The further action after redirecting.

##### method (String)

Method of redirecting. The valid value is `POST`.

##### parameters (String)

Parameters included in a POST request.

##### redirectUrl (String)

The merchant page URL that the buyer is redirected to collect device information.

More information:

- Maximum length: 1024 characters

#### result (Result, REQUIRED)

The result of the API call.

##### resultCode (String, REQUIRED)

The result code. The possible result codes are listed in the **Result/Error codes** table on this page.

More information:

- Maximum length: 64 characters

##### resultStatus (String, REQUIRED)

The result status. Valid values are:

-   `S`: indicates that the API call succeeds.
-   `F`: indicates that the API call fails.
-   `U`: indicates that the API call might be successful, in process, or failed.

##### resultMessage (String, REQUIRED)

The result message that explains the result code.

More information:

- Maximum length: 256 characters

## Result/Error codes

| Code | Value | Message |
| --- | --- | --- |
| SUCCESS | S | Success |

## Request

```json
{
  "authenticationRequestId": "202401abcdefg_sda_202404287_yf_gogo_23",
  "identityType": "CARD_PAN",
  "paymentRedirectUrl": "http://www.merchantsite.com",
  "authenticationType": "THREEDS",
  "identityValue": {
    "cardBrand": "VISA",
    "cardBin": "412408",
    "funding": "D"
  }
}
```

## Response

```json
{
  "authenticationId": "2024050716031241000190000162360",
  "authenticationRequestId": "202401abcdefg_sda_202404287_yf_gogo_24",
  "redirectActionForm": {
    "method": "POST",
    "parameters": "{\"ddcReferenceId\":\"af39d8b9-ff19-4013-a097-c54c8375efe2\",\"Bin\":\"412408\",\"JWT\":\"eyJraWQiOiJDQVJESU5BTF9KV1RfYWxpcGF5IiwiY3R5IjoiQ0FSRElOQUxfSldUX2FsaXBheSIsImFsZyI6IkhTMjU2In0.eyJPcmdVbml0SWQiOiI1ZDA5NDJmNmJiODc2ODE5NmMzMTYzYTciLCJSZWZlcmVuY2VJZCI6ImFmMzlkOGI5LWZmMTktNDAxMy1hMDk3LWM1NGM4Mzc1ZWZlMiIsIlJldHVyblVybCI6Im9wZW4tdGVzdC1kZS1ncm91cDIwMjQwNDE4MTQxNDEyLmRsLmFsaXBheWRldi5jb20vYXBpL29wZW4vdXJsX2NhbGxiYWNrX2dldC9jYXJkaW5hbC9jYXJkaW5hbDAwNy5odG0_c2lnbkRhdGE9UGJMendDMk9qYnJIRzNwJTJGOSUyRm1qV2ZCSE5WZmVObzRwJTJCR1NvV3JYNXJFZDY2T3RWVUI0VmNuaE1WcVdTQnZmR2NNdDRRV3pNbUFvek90UjgzRTlYNkVTZEpaRVdiQkQlMkZKS1ZjZHYlMkJpQlcxUHVmR0EzQWZtMGQ3M2lGWFZXNjlqT0ZzOTBqTCUyQm5qb0ZXQTRZWEklMkZ3UExwRVN3T2YlMkJscXhjbUNUVXlETFg2U3hJY0x3ZEF0Y2NZeG5oc0FaVmclMkZCMVFTdHl6diUyQk1sVEtXVUpzdmlYR0c4MDBFa3E5Q29YJTJGWjVNSnQlMkJZRG11WHBHZ0l6OUhKUmxrY0RxRGpySXUlMkY5VSUyRmpMa01VWWNoelJWYXNvdDZDY25uWG5FaktjSW1VeWw1ekxNdlE0Y2M1WGlPWElKdG5SdDdmNlZ3MnRacDNJWVVqMkM1Mld0bWh0JTJGejB4Z05abWlnJTNEJTNEJmluU2VyaWFsTm89MjAyNDA1MDcxNjAzMTM0MTAwMDE5MDAwMDE0NDU3MyZvdXRPcmRlck5vPTIwMjQwNTA3MTYwMzEzNDEwMDAxOTAwMDAxNDQ1NzMiLCJleHAiOjE3MTUwODE3MzgsImlhdCI6MTcxNTA4MDgzOCwiaXNzIjoiNWQwOTQ4MDlhZmE4MGQyMjUwMDQyODBkIiwianRpIjoiMjAyNDA1MDcxNjAzMTM0MTAwMDE5MDAwMDE0NDU3MyJ9.upNHVxubLYrAGzRWUhIM19v9kZ6yPyrR_JG4H54BWAU\"}",
    "redirectUrl": "https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect"
  },
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success.",
    "resultStatus": "S"
  }
}
```