POST /v1/payments/inquiryPayment returns the latest status of a wallet payment. Merchants poll this API when asynchronous callbacks (for example via paymentNotifyUrl) do not arrive in time. Always send requests in the smallest currency unit (IQD fils).
100000.
my.getAuthCode with the required scopes to request authorization.authCode.authCode to the Mini Program.authCode to the merchant backend.applyToken with the authCode to obtain tokens.accessToken, refreshToken, and customerId information to the merchant backend.customerId and sends it to the merchant backend./v1/payments/pay to initiate the payment and receives a redirectionUrl and optional paymentNotifyUrl confirmation.redirectionUrl to the Mini Program.my.tradePay with the redirectionUrl to open the cashier experience.paymentNotifyUrl./v1/payments/inquiryPayment with paymentId or paymentRequestId, and the wallet backend responds with the latest payment status and transaction details.| Method | Path |
|---|---|
POST | /v1/payments/inquiryPayment |
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 | Conditional | Wallet-generated payment ID. Max 64 characters. Provide either paymentId or paymentRequestId. | "202312061112128001001660090000xxxx" |
paymentRequestId | string | Conditional | Merchant-generated payment ID. Max 64 characters. Used when paymentId is unavailable. | "20230101234567890133333xxxx" |
{
"paymentRequestId": "102217200000000000001xxxx"
}
{
"paymentId": "202312061112128001001660090000xxxx"
}
Provide either
paymentIdorpaymentRequestId(not both). If both are provided,paymentIdtakes precedence.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
result | object | Yes | Request outcome metadata (status and error codes). | { "resultCode": "SUCCESS", "resultStatus": "S", "resultMessage": "success" } |
paymentId | string | No | Wallet payment ID. | "202312061112128001001660090000xxxx" |
paymentRequestId | string | No | Merchant payment ID. | "20230101234567890133333xxxx" |
paymentAmount | object | No | Amount/value pair in smallest currency unit. | { "value": "100000", "currency": "IQD" } |
paymentTime | string | No | Payment completion timestamp in ISO 8601 format. | "2023-01-01T12:01:01+08:00" |
paymentStatus | string | No | Status of the payment. Possible values: PROCESSING, AUTH_SUCCESS, SUCCESS, FAIL. | "SUCCESS" |
transactions | array | No | Detailed transaction records (amount, type, status, timestamp). | [{"transactionAmount":{"value":"100000","currency":"IQD"},"transactionId":"20231206111212800100xxxx","transactionTime":"2023-01-01T12:01:01+08:30","transactionType":"PAY","transactionStatus":"SUCCESS"}] |
extendInfo | string | No | Additional information supplied by wallet or merchant. Max length 2048 characters. | "extendInfo": "additional information" |
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
},
"paymentId": "202312061112128001001660090000xxxx",
"paymentRequestId": "20230101234567890133333xxxx",
"paymentAmount": {
"value": "100000",
"currency": "IQD"
},
"paymentTime": "2023-01-01T12:01:01+08:00",
"paymentStatus": "SUCCESS",
"transactions": [
{
"transactionAmount": {
"value": "100000",
"currency": "IQD"
},
"transactionId": "20231206111212800100xxxx",
"transactionTime": "2023-01-01T12:01:01+08:30",
"transactionType": "PAY",
"transactionStatus": "SUCCESS"
}
]
}
| Status | Description |
|---|---|
S | Inquiry succeeded. Check paymentStatus for the actual payment outcome. |
U | Result unknown (resultCode: UNKNOWN_EXCEPTION). Retry later and monitor notifications. |
F | Inquiry failed. Review resultCode and resultMessage; see Error codes. |
| resultStatus | resultCode | resultMessage | Recommended Action |
|---|---|---|---|
F | ORDER_NOT_EXIST | Order does not exist. | Verify paymentId/paymentRequestId; treat as unpaid until clarified. |