Latest update time:2021.12.14 Release notes
After submitting a refund request, check the refund status by calling this API. There may be a delay in refund. The refund paid by balance will be received within 20 minutes. For refunds paid by bank cards, check the refund status after 3 business days.
Request URL:https://api.mch.weixin.qq.com/hk/v3/refunds/id/{id}?sp_mchid=parameter value1&sub_mchid=parameter value2
OR
https://api.mch.weixin.qq.com/hk/v3/refunds/out-refund-no/{out_refund_ no}?sp_mchid=parameter value1&sub_mchid=parameter value2
Note: The {id} in the URL refers to the refund No. on WeChat, while the {out_refund_no} refers to the actual merchant refund No., either of which is called.For orders completed one year ago, check the refund via the merchant refund No.
Request method: GET
Applicable object:Common modeInstitutional mode
API Rules: https://wechatpay-api.gitbook.io/wechatpay-api-v3
path parameter is a path parameter.
query parameter needs to be passed in the request URL.
body parameter needs to be passed in the request JSON.
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
Merchant ID | mchid | string(32) | Yes | query Merchant ID assigned by WeChat Pay Note: Only forCommon mode Example:1900000109 |
Sub-merchant ID | sub_mchid | string(32) | Yes | query Merchant ID assigned to sub-merchants by WeChat Pay Note: Only forInstitutional mode Example:1900000109 |
Institution's Merchant ID | sp_mchid | string(32) | Yes | query Merchant ID assigned to merchants by WeChat Pay Note: Only forInstitutional mode Example:1900000100 |
WeChat Pay refund order No. | id | string(32) | Yes | path WeChat Pay refund order No. Example:1217752501201407033233368018 |
Merchant refund No. | out_refund_no | string(64) | Yes | path Returned refund order No. Example:1217752501201407033233368018 |
https://api.mch.weixin.qq.com/hk/v3/refunds/id/1217752501201407033233368018?mchid=1900000109
https://api.mch.weixin.qq.com/hk/v3/refunds/out-refund-no/1217752501201407033233368018?sub_mchid=1900000109&sp_mchid=1900000100
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
Returned status code | code | string(32) | Yes | Error code. See the error code list for the enumerated values. Example:INVALID_REQUEST |
Returned message | message | string(256) | Yes | Returned message. It indicates the reason for the error if not empty. Example:Parameter format verification error |
+ Detailed error description | detail | array | No | It is returned when code is PARAM_ERROR. Details will be described below. |
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
WeChat Pay refund order No. | id | string(32) | Yes | WeChat Pay refund order No. Example:1217752501201407033233368018 |
Merchant refund No. | out_refund_no | string(64) | Yes | Returned refund order No. Example:1217752501201407033233368018 |
WeChat Pay transaction order No. | transaction_id | string(32) | Yes | WeChat Pay transaction order No. Example:1217752501201407033233368018 |
Original merchant transaction order No. | out_trade_no | string(64) | Yes | The returned original transaction order No. Example:1217752501201407033233368018 |
Refund channel | channel | string(16) | No | ORIGINAL:Refund to the paying account BALANCE:Refund to the balance OTHER_BALANCE:Refund to other balance accounts in case of original account error OTHER_BANKCARD:Refund to other bank cards if there is something wrong with the original bank card. Example:ORIGINAL |
Refund receiving account | recv_account | string(64) | No | Refund receiving party of the current refund order 1) Refund to bank cards: {Bank name}{Card type}{Last numbers of the bank card} 2)Refund to the balance of the paying use: The balance of the paying user 3)Refund to the Mini Fund of the paying user: The Mini Fund of the paying use Example:China Merchants Bank Credit Card 0403 |
Refund source | fund_source | string(30) | No | REFUND_SOURCE_UNSETTLED_FUNDS:Refund with unsettled funds (default) REFUND_SOURCE_RECHARGE_FUNDS:Refund with available balance Example:REFUND_SOURCE_UNSETTLED_FUNDS |
Refund completion time | success_time | string(64) | No | Refund completion time, which is returned when the refund status is successful. Example:2018-06-08T10:34:56+08:00 |
Refund creation time | create_time | string(64) | Yes | Refund acceptance time Example:2018-06-08T10:34:56+08:00 |
Refund status | status | string(16) | Yes | Refund status: SUCCESS:Refund successful REFUNDCLOSE:Refund closed PROCESSING:Refund in process Example:SUCCESS |
+ Refund amount | amount | object | Yes | Information on the refund amount. For more information, see the description below. |
+ Discount refund details | detail | object | No | Discount refund info. For more information, see the description below. |
{
"id": "2008450740201411110000174436",
"out_refund_no": "R20150806125346",
"transaction_id": "1008450740201411110005820873",
"out_trade_no": "20150806125346",
"amount": {
"refund": 50,
"currency": "CNY",
"payer_refund": 49,
"payer_currency": "HKD",
"exchange_rate" : {
"type": "SETTLEMENT_RATE",
"rate": 8000000
}
},
"detail": [
{
"promotion_id":"109519",
"scope":"GLOBAL",
"type":"COUPON",
"amount": 1,
"refund_amount": 1,
"currency":"HKD"
}
],
"channel": "ORIGINAL",
"status": "SUCCESS",
"recv_account": "China Merchants Bank Credit Card 0403",
"fund_source": "REFUND_SOURCE_RECHARGE_FUNDS",
"success_time": "2018-06-08T10:34:56+08:00",
"create_time": "2018-06-08T10:34:56+08:00"
}
Name | Description | Solution |
---|---|---|
SYSTEMERROR | Errors returned from the API | Try call the API again. |
REFUNDNOTEXIST | Failed to view the refund order | Check whether the order No. and the order status (e.g. unpaid and paid but not refunded) are correct. If there is no refund order under the order, only this error code is returned. |
INVALID_TRANSACTIONID | Invalid transaction_id | Invalid request parameter. Check whether the original transaction No. exists and whether the API for initiating payment transaction returns failure. |
PARAM_ERROR | Request parameter was not properly filled in as instructed. | Invalid request parameter. Re-check the parameter and then call the refund request again. |
APPID_NOT_EXIST | APPID does not exist. | Check whether APPID is correct. |
MCHID_NOT_EXIST | MCHID does not exist. | Check whether MCHID is correct. |
REQUIRE_POST_METHOD | Use post method. | Check whether the request parameter is submitted via post method. |
SIGNERROR | Signature error | Check if signature parameters and methods meet the algorithm requirements. |
Customer Service Tel
Business Development
9:00-18:00
Monday-Friday GMT+8
Technical Support
WeChat Pay Global
ICP证