# antom.confirmCardSetup()

> antom.confirmCardSetup() method is used in card vaulting scenarios. It takes a mounted VaultingElement instance to submit the binding request and returns a Promise object that resolves with the binding result.

`antom.confirmCardSetup()` method is used in card vaulting scenarios. It takes a mounted [`VaultingElement`](https://docs.antom.com/ac/sdks/web_VaultingElement.md) instance to submit the binding request and returns a `Promise` object that resolves with the binding result.

> **Note:**
>
> -   Before calling `antom.confirmCardSetup()`, you must first call [`element.mount()`](https://docs.antom.com/ac/sdks/web_element-mount.md) to mount the element to the DOM.
> -   If the binding process requires 3D verification, the SDK will automatically display a verification window, and the process will continue after the user completes the verification.
> -   The `PROCESSING` status indicates that the binding is still in progress. It is recommended to poll the final status via the server-side API.

## **Method signature**

When calling this method, please use the following standard method signature format.

#### Tab: JavaScript

```javascript
antom.confirmCardSetup(options)
```

#### Tab: TypeScript

```typescript
antom.confirmCardSetup(options: ConfirmCardSetupOptions): Promise<ConfirmCardSetupResult>
```

## Parameters

This method includes the following parameter:

| **Parameter** | **Data type** | **Required** | **Description** |
| --- | --- | --- | --- |
| [_options_](#SxIQ7) | Object | Yes | An object for card setup confirmation, containing the mounted Element instance and redirect policy configuration. |

### _options_

| **Parameter** | **Data type** | **Required** | **Description** |
| --- | --- | --- | --- |
| _elements_ | String | Yes | The mounted [`VaultingElement`](https://docs.antom.com/ac/sdks/web_VaultingElement.md) instance. |
| _redirect_ | String | No | The redirection policy. Valid values are: - `always`: The SDK automatically redirects or opens the app. - `if_required`: Redirect only when the payment method requires it; otherwise, the merchant handles the return URL. |

## Return value

This method returns a `Promise` object that resolves to a card binding result object, which includes the following sub-parameters:

| **Parameter** | **Data type** | **Required** | **Description** |
| --- | --- | --- | --- |
| _status_ | String | Yes | Vaulting status. You can simplify the integration processing based on the value of _status_. You may also perform refined exception handling based on _error?.code_. Valid values are:<br/><br/>- `SUCCESS`: Vaulting succeeded.<br/>- `PROCESSING`: Vaulting processing.<br/>- `FAIL`: Vaulting failed.<br/>- `CANCELLED`: Vaulting canceled. |
| _userCanceled3D_ | Boolean | No | Indicates whether the buyer actively closed the 3D Secure authentication popup. Valid values are:<br/><br/>- `true`: Buyer actively terminated the 3D process. When this value is returned, it is recommended to poll the result from the server.<br/>- `false`: 3D process was not terminated by the buyer. |
| [_error_](#AMRcr) | Object | No | This parameter is only returned when the operation fails, and is an _error_ object containing _code_ and _message_ parameters. If not returned, the operation was successful. |

### _error_

| **Parameter** | **Data type** | **Required** | **Description** |
| --- | --- | --- | --- |
| _code_ | String | Yes | Error code. |
| _message_ | String | Yes | Error message. |
| _traceId_ | String | No | Trace ID for issue investigation. |
| _context_ | Any | No | Error context information. |

## Error codes

Use the [`element.on()`](https://docs.antom.com/ac/sdks/web_element-on.md) method to listen for error codes related to the `antom.confirmCardSetup()` method. For a detailed list of error codes, please refer to the [Error codes](https://docs.antom.com/ac/sdks/web_element-on.md#Wiybs).