/v1/payments/confirm
POST /v1/payments/confirm
The confrim API 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 confrim 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.
Message structure
A message consists of a header and body. The following sections focus on the body structure. For the header structure, see:
Request
Property | Data Type | Required | Description | Example |
paymentId | String | Yes | The unique ID that is assigned by the wallet to identify a payment. Max. length: 64 characters. | "2023120611121280010016600090000xxxx" |
confrimRequestId | String | Yes | The unique ID is assigned by a merchant to identify a confrim request. Max. length: 64 characters. | "1022188000000000001xxxx" |
extendInfo | String | No | The extension information that wallets and merchants want to describe. The format shoud be JSON format. Max. length: 2048 characters. |
Response
Property | Data Type | Required | Description | Example |
result | Yes | The request result, which contains information such as result status and error codes. | { "resultCode": "SUCCESS", "resultStatus": "S", "resultMessage": "Success." } | |
confrimId | String | No | The unique ID for a confirm request generated by the wallet. Max. length: 64 characters | "2023120611121280010016600090000xxxx" |
confrimTime | String | No | The processing time for a confrim request. The format of the value follows the ISO 8601 standard. | "2025-07-08T12:12:12+08:00" |
Result process logic
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
| It means that the merchant accept is successful. The corresponding
|
U | It means that the status of the confirm result is unknown. The corresponding
| |
F | It means that the confirm fails. The corresponding
|
Error codes
Error codes are usually classified into the following categories:
- Common error codes are common across all mini program's APIs.
- API-specific error codes: are listed in the following table.
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. |
Samples
For example, a customer pays 1,000 IQD for a meal on a food delivery platform. After the order is delivered and the customer verifies that the items are correct and in good condition (e.g., correct quantity, acceptable quality, no spillage), the customer may then confirm the order.

- The Mini Program calls this my.getAuthCode JSAPI with specific scopes(USER_ID) to request an authorization code.
- The E-wallet App service calls authorization service to processes the authorization information.
- The E-wallet backend verifies the authorization information, generates the authCode and returns.
- The E-wallet App service returns the authCode to the Mini Program.
- The Mini Program sends the authCode to the merchant backend.
- The merchant backend calls the applyToken API with authCode to apply the accessToken.
- The E-Wallet backend returns accessToken information to the merchant backend, such as customerId, accessToken, refreshToken, etc.
- The merchant backend returns customerId to mini program.
- The Mini Program creates an order with customerId.
- The merchant backend calls the payment API to initialte payment flow, including customerId as referenceBuyerId, paymentNotifyUrl(optional), etc.
- The E-Wallet backend returns payment detail information the merchant backend, such as redirectionUrl.
- The merchant backend passes the payment detail information to the Mini Program.
- The Mini Program calls the my.tradePay JSAPI with redirectionUrl to conduct the payment.
- The E-Wallet App Service displays the cashier page with order information, such as amount, order details, etc.
- The user confirms the payment in the cashier page.
- The E-Wallet App Service calls payment service and execute the payment process.
- When the payment reaches the final status, the E-wallet backend returns the payment result to the Mini Program (Step 19).
- The E-Wallet App Service returns the payment result to mini program.
- Also the E-wallet backend notifies the merchant backend of the payment result with paymentNotifyUrl provided in Step 10.
- Finally, E-wallet backend notifies the user of the payment result via SMS/Email/Inbox message .
- Merchant backend calls the
merchantAcceptAPI to accept this order. - The E-Wallet backend returns the merchantAccept result to the merchant backend.
- The Mini Program sends the confirm request to merchant backend, and the merchant backend calls the
confrimAPI to capture the money(Step 25). - The E-Wallet backend returns the confirm result to the merchant backend.
- And the Mini Program displays the confirm result to the user(Step 28).
- When the E-Wallet backend returns the resultCode as CONFIRM_IN_PROCESS, the merchant can call
inquiryPaymentAPI to query confirm result (Step 29).
Request
{
"paymentId":"20240719111212800100166017200026447",
"confrimRequestId":"202331231313123123"
}- paymentId is the unique Id of a payment generated by Wallet, which is the unique payment identifier associated with this confirm.
Response
{
"result": {
"resultCode":"SUCCESS",
"resultStatus":"S",
"resultMessage":"Success."
},
"confrimId":"20240719111212801800166013400002704",
"confirmTime":"2024-07-19T12:12:12+08:00"
}- result.resultStatus==S shows that the Wallet confirm is successful.