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.
Note:
- Before calling
antom.confirmCardSetup(), you must first callelement.mount()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
PROCESSINGstatus 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.
antom.confirmCardSetup(options)Parameters
This method includes the following parameter:
Parameter | Data type | Required | Description |
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 |
| redirect | String | No | The redirection policy. Valid values are:
|
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:
|
| userCanceled3D | Boolean | No | Indicates whether the buyer actively closed the 3D Secure authentication popup. Valid values are:
|
| error | 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() 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.