# fetchNonce

> Use this API to collect card information when you do not have PCI qualifications.

`POST /v1/vaults/fetchNonce`

Use this API to collect card information when you do not have PCI qualifications.

# 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

#### card (Card)

The card information.

##### cardNo (String, REQUIRED)

The card number.

More information:

- Maximum length: 32 characters

##### cvv (String)

The card verification value (CVV), which is also known as a card security code (CSC) or a card verification code (CVC).

> Specify this parameter when the value of _paymentMethodRegion_ is `GLOBAL`, `BR`, `CL`, `MX`, or `PE`.

More information:

- Maximum length: 4 characters

##### expiryYear (String, REQUIRED)

The year the card expires. Pass in the last two digits of the year number. For example, if the expiry year is 2025, the value of this parameter is `25`.

More information:

- Maximum length: 2 characters

##### expiryMonth (String, REQUIRED)

The month the card expires. Pass in two digits representing the month. For example, if the expiry month is February, the value of this parameter is `02`.

More information:

- Maximum length: 2 characters

##### cardholderName (UserName)

The cardholder's name.

> Specify this parameter when the value of _paymentMethodRegion_ is `BR`, `CL`, `MX`, or `PE`.

###### firstName (String, REQUIRED)

The cardholder's first name.

More information:

- Maximum length: 32 characters

###### lastName (String, REQUIRED)

The cardholder's last name.

More information:

- Maximum length: 32 characters

## Response parameters

#### result (Result, REQUIRED)

The result of the API call.

##### resultCode (String, REQUIRED)

Result code. The result code that might be returned are listed in the **Result/Error codes** table on this page.

More information:

- Maximum length: 64 characters

##### resultStatus (String, REQUIRED)

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. For more details, see Result process logic.

##### resultMessage (String, REQUIRED)

Result message that explains the result code.

More information:

- Maximum length: 256 characters

#### cardToken (String, REQUIRED)

The token of the card. The value of this parameter is used by _paymentMethodId_ in the [**pay (One-time Payments)**](https://docs.antom.com/ac/ams/payment_cashier.md) API when initiating payments.

More information:

- Maximum length: 255 characters

## Result/Error codes

| Code | Value | Message | Further action |
| --- | --- | --- | --- |
| SUCCESS | S | Success | No further action is needed. |
| PROCESS_FAIL | F | The called API is failed. | Do not retry. Human intervention is usually needed. It is recommended that you contact Antom Technical Support to troubleshoot the issue. |

## Request

```json
{
  "card": {
    "cardNo": "411111111111****",
    "cvv": "123",
    "expiryMonth": "11",
    "expiryYear": "2028",
    "cardholderName": {
      "firstName": "Tom",
      "lastName": "Jerry"
    }
  }
}
```

## Response

```json
{
  "cardToken": "PYMT2f76a5bc2e244d1eaba993d7e5e6****",
  "result": {
    "resultCode": "SUCCESS",
    "resultMessage": "success.",
    "resultStatus": "S"
  }
}
```