POST /v1/payments/inquiryRefund retrieves the current status of a wallet refund. Use this endpoint when the refund completion callback takes longer than expected. All monetary amounts must be sent in the smallest currency unit (IQD fils).
100000.
my.getAuthCode with USER_ID scope to request authorization.authCode to the wallet app service.authCode to the Mini Program.authCode to the merchant backend.applyToken with the authCode to obtain tokens.accessToken, refreshToken, customerId) to the merchant backend.customerId./v1/payments/pay, providing customerId, paymentNotifyUrl, etc.redirectionUrl) to the merchant backend.my.tradePay with the redirectionUrl.paymentNotifyUrl./v1/payments/refund to request the refund from the wallet backend.resultCode of the refund is REFUND_IN_PROCESS, merchant backend polls /v1/payments/inquiryRefund using refundId or refundRequestId.| Method | Path |
|---|---|
POST | /v1/payments/inquiryRefund |
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 |
|---|---|---|---|---|
refundId | string | Conditional | Wallet-generated refund ID (max 64 characters). Provide either refundId or refundRequestId. | "202312061112128013001660090000xxxx" |
refundRequestId | string | Conditional | Merchant-generated refund ID (max 64 characters). Used when refundId is not available. | "2023010123456789013255xxxx" |
{
"refundId": "202312061112128013001660090000xxxx",
"refundRequestId": "2023010123456789013255xxxx"
}
If both identifiers are supplied,
refundIdtakes precedence andrefundRequestIdis ignored.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
result | object | Yes | Outcome metadata, including resultCode, resultStatus, and resultMessage. | { "resultCode": "SUCCESS", "resultStatus": "S", "resultMessage": "success" } |
refundId | string | No | Wallet refund ID. | "202312061112128013001660090000xxxx" |
refundRequestId | string | No | Merchant refund ID. | "2023010123456789013255xxxx" |
refundAmount | object | No | Refund amount/value in smallest currency unit. | { "value": "100000", "currency": "IQD" } |
refundReason | string | No | Reason for the refund, if supplied (max 256 characters). | "Customer requested order cancellation." |
refundTime | string | No | Timestamp when funds were deducted from the merchant (ISO 8601). | "2023-01-02T12:01:01+08:30" |
refundStatus | string | No | Refund processing state: PROCESSING, SUCCESS, or FAIL. | "SUCCESS" |
refundFailReason | string | No | Description explaining why the refund failed (present when refundStatus is FAIL). | "Refund declined by issuer." |
extendInfo | string | No | Additional metadata provided by wallet or merchant (max 2048 characters). | "extendInfo": "additional info" |
{
"result": {
"resultCode": "SUCCESS",
"resultStatus": "S",
"resultMessage": "success"
},
"refundId": "202312061112128013001660090000xxxx",
"refundRequestId": "2023010123456789013255xxxx",
"refundAmount": {
"value": "100000",
"currency": "IQD"
},
"refundReason": "Order cancelled by user.",
"refundTime": "2023-01-02T12:01:01+08:30",
"refundStatus": "SUCCESS"
}
| Status | Description |
|---|---|
S | Refund inquiry succeeded. Inspect refundStatus for the current state. |
U | Unknown result (resultCode: UNKNOWN_EXCEPTION). Retry later or review logs. |
F | Inquiry failed. Review resultCode/resultMessage; see Error codes. |
| resultStatus | resultCode | resultMessage | Recommended Action |
|---|---|---|---|
F | REFUND_NOT_EXIST | Refund does not exist. | Verify refundId/refundRequestId; treat as pending if refund is still in process. |