antom.confirmPayment()
The antom.confirmPayment() method is used in saved‑card payment scenarios. When you initiate a payment with a specified saved card, the method automatically determines whether CVV verification is required and how to handle the post‑payment redirection process based on the configuration parameters.
Method signature
When calling this method, please use the following standard method signature format.
antom.confirmPayment(params)Parameters
This method includes the following parameter:
Parameter | Data type | Required | Description |
Object | Yes | The payment confirmation parameter object, which contains configurations for session data, an Element instance, and the redirect strategy. |
params
Parameter | Data type | Required | Description |
| sessionData | String | Yes | Payment session data used to identify the current payment. |
appearance | Object | No | Appearance settings, applicable only in scenarios where CVV collection is not required (No‑UI payment). For more details, see Appearance customization. |
| elements | String | No | The mounted
|
| redirect | String | No | The redirection policy. Valid values are:
|
Return value
This method returns a Promise object that resolves to a payment result object, which includes the following sub-parameters:
Parameter | Data type | Required | Description |
| status | String | Yes | Payment 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 log trace queries. |
context | Any | No | Error context information. |
needChangeSessionForRetry | Boolean | No | Indicates whether the session needs to be changed for retry. |