POST /v1/payments/confirm is used to capture the total authorized payment amount from a user's account, and then transfer the total amount of the payment to a merchant's account after the user confirms receipt. The confirm can only be initiated once and in full.
Note: The merchant may call the confirm API to notify A+ that the order has been confirmed only after the customer has actually completed the order confirmation.
All monetary amounts in requests and responses must be expressed in the smallest currency unit (IQD fils). For example, 100 IQD equals 100000.
51051000101000100008) can use this API.merchantAccept before the customer can confirm.
my.getAuthCode JSAPI with specific scopes(USER_ID) to request an authorization code.authCode and returns.authCode to the Mini Program.authCode to the merchant backend.authCode to apply the accessToken.accessToken information to the merchant backend, such as customerId, accessToken, refreshToken, etc.customerId.customerId as referenceBuyerId, paymentNotifyUrl(optional), etc.redirectionUrl.my.tradePay JSAPI with redirectionUrl to conduct the payment.merchantAccept API to accept this order.confirm API to capture the money(Step 25)./v1/payments/confirm.Alternative flow:
When the E-Wallet backend returns the resultCode as CONFIRM_IN_PROCESS, the merchant can call inquiryPayment API to query confirm result (Step 29).
| Method | Path |
|---|---|
POST | /v1/payments/confirm |
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see: OpenAPIs Overview.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
paymentId | string | Yes | The unique ID that is assigned by the wallet to identify a payment. Max. length: 64 characters. | "202312061112128001016" |
confirmRequestId | string | Yes | The unique ID is assigned by a merchant to identify a confirm request. Max. length: 64 characters. | "1022188000000000001xxxx" |
extendInfo | string | No | The extension information that wallets and merchants want to describe. The format should be JSON format. Max. length: 2048 characters. | - |
{
"paymentId": "202312061112128001001660090000xxxx",
"confirmRequestId": "1022188000000000001xxxx"
}
The
confirmRequestIdis used for idempotence—repeat submissions with the same ID will yield the same final result.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
result | object | Yes | The request result, which contains information such as result status and error codes. | { "resultCode": "SUCCESS", "resultStatus": "S", "resultMessage": "Success." } |
confirmId | string | No | The unique ID for a confirm request generated by the wallet. Max. length: 64 characters. | "202312061112128001016x" |
confirmTime | string | No | The processing time for a confirm request. The format of the value follows the ISO 8601 standard. | "2025-07-08T12:12:12+08:00" |
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "Success."
},
"confirmId": "202312061112128001016x",
"confirmTime": "2025-07-08T12:12:12+08:00"
}
In the response, the result.resultStatus field indicates the result of processing a request. The following table describes each result status:
| resultStatus | Description |
|---|---|
S | It means that the confirm is successful. The corresponding result.resultCode is "SUCCESS", and the result.resultMessage is "Success.". |
U | It means that the status of the confirm result is unknown. The corresponding result.resultCode is UNKNOWN_EXCEPTION, and result.resultMessage is "An API calling is failed, which is caused by unknown reasons". For details, see the Common error codes section. |
F | It means that the confirm fails. The corresponding result.resultCode and result.resultMessage may vary based on different situations. For details, see the Error codes section. |
Error codes are usually classified into the following categories:
| resultStatus | resultCode | resultMessage |
|---|---|---|
F | ORDER_UNSUPPORTED_OPERATION | The order is not support capture. |
F | ORDER_STATUS_INVALID | The order status is invalid. |
F | ORDER_NOT_EXIST | The order does not exist. |
U | CONFIRM_IN_PROCESS | The confirm is processing. |
F | CURRENCY_NOT_SUPPORT | The currency of a user's payment is not supported by the merchant. |
F | USER_NOT_EXIST | The user does not exist. |
F | USER_STATUS_ABNORMAL | The user status is abnormal. |
F | REPEAT_REQ_INCONSISTENT | The submitted request is not consistent with the repeated one. |
F | MUTEX_OPERATION_IN_PROCESSING | There is another payment void, confirm, or capture in processing. |
F | PARTNER_NOT_EXIST | The partner does not exist. |
F | PARTNER_STATUS_ABNORMAL | The partner status is abnormal. |
51051000101000100008 for escrow)