查询控制单
更新时间:2025.09.09根据外部单号查询管控单、解管单。
管控单:未解管时支持长期查询,解管后支持1年查询。
解管单:支持1年查询。
限频:200/分钟
接口说明
支持商户:【普通商户】
请求方式:【GET】/v3/aggracct-bc/wb-channel/control-orders/{out_request_no}
请求域名:【主域名】https://api.mch.weixin.qq.com 使用该域名将访问就近的接入点
【备域名】https://api2.mch.weixin.qq.com 使用该域名将访问异地的接入点 ,指引点击查看
请求参数
Header HTTP头参数
Authorization 必填 string
请参考签名认证生成认证信息
Accept 必填 string
请设置为application/json
path 路径参数
out_request_no 必填 string
【微众管控\解管单号】 需与控制单类型保持一致
query 查询参数
control_type 必填 string
【控制单类型】 管控\解管
可选取值
PUNISH
: 管控RECOVER
: 解管
mchid 必填 string
【目标管控\解管商户号】 需与控制单类型保持一致
请求示例
GET
1curl -X GET \ 2 https://api.mch.weixin.qq.com/v3/aggracct-bc/wb-channel/control-orders/out_request_no_example?control_type=PUNISH&mchid=mchid_example \ 3 -H "Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"1900000001\",..." \ 4 -H "Accept: application/json" 5
需配合微信支付工具库 WXPayUtility 使用,请参考Java
1package com.java.demo; 2 3import com.java.utils.WXPayUtility; // 引用微信支付工具库,参考:https://pay.weixin.qq.com/doc/v3/merchant/4014931831 4 5import com.google.gson.annotations.SerializedName; 6import com.google.gson.annotations.Expose; 7import okhttp3.MediaType; 8import okhttp3.OkHttpClient; 9import okhttp3.Request; 10import okhttp3.RequestBody; 11import okhttp3.Response; 12 13import java.io.IOException; 14import java.io.UncheckedIOException; 15import java.security.PrivateKey; 16import java.security.PublicKey; 17import java.util.ArrayList; 18import java.util.HashMap; 19import java.util.List; 20import java.util.Map; 21 22/** 23 * 查询控制单 24 */ 25public class QueryByOutRequestNo { 26 private static String HOST = "https://api.mch.weixin.qq.com"; 27 private static String METHOD = "GET"; 28 private static String PATH = "/v3/aggracct-bc/wb-channel/control-orders/{out_request_no}"; 29 30 public static void main(String[] args) { 31 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/merchant/4013070756 32 QueryByOutRequestNo client = new QueryByOutRequestNo( 33 "19xxxxxxxx", // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756 34 "1DDE55AD98Exxxxxxxxxx", // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053 35 "/path/to/apiclient_key.pem", // 商户API证书私钥文件路径,本地文件路径 36 "PUB_KEY_ID_xxxxxxxxxxxxx", // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013038816 37 "/path/to/wxp_pub.pem" // 微信支付公钥文件路径,本地文件路径 38 ); 39 40 QueryByOutRequestNoRequest request = new QueryByOutRequestNoRequest(); 41 request.outRequestNo = "outRequestNo_example"; 42 request.controlType = ControlType.PUNISH; 43 request.mchid = "mchid_example"; 44 try { 45 ControlOrdersEntity response = client.run(request); 46 // TODO: 请求成功,继续业务逻辑 47 System.out.println(response); 48 } catch (WXPayUtility.ApiException e) { 49 // TODO: 请求失败,根据状态码执行不同的逻辑 50 e.printStackTrace(); 51 } 52 } 53 54 public ControlOrdersEntity run(QueryByOutRequestNoRequest request) { 55 String uri = PATH; 56 uri = uri.replace("{out_request_no}", WXPayUtility.urlEncode(request.outRequestNo)); 57 Map<String, Object> args = new HashMap<>(); 58 args.put("control_type", request.controlType); 59 args.put("mchid", request.mchid); 60 String queryString = WXPayUtility.urlEncode(args); 61 if (!queryString.isEmpty()) { 62 uri = uri + "?" + queryString; 63 } 64 65 Request.Builder reqBuilder = new Request.Builder().url(HOST + uri); 66 reqBuilder.addHeader("Accept", "application/json"); 67 reqBuilder.addHeader("Wechatpay-Serial", wechatPayPublicKeyId); 68 reqBuilder.addHeader("Authorization", WXPayUtility.buildAuthorization(mchid, certificateSerialNo, privateKey, METHOD, uri, null)); 69 reqBuilder.method(METHOD, null); 70 Request httpRequest = reqBuilder.build(); 71 72 // 发送HTTP请求 73 OkHttpClient client = new OkHttpClient.Builder().build(); 74 try (Response httpResponse = client.newCall(httpRequest).execute()) { 75 String respBody = WXPayUtility.extractBody(httpResponse); 76 if (httpResponse.code() >= 200 && httpResponse.code() < 300) { 77 // 2XX 成功,验证应答签名 78 WXPayUtility.validateResponse(this.wechatPayPublicKeyId, this.wechatPayPublicKey, 79 httpResponse.headers(), respBody); 80 81 // 从HTTP应答报文构建返回数据 82 return WXPayUtility.fromJson(respBody, ControlOrdersEntity.class); 83 } else { 84 throw new WXPayUtility.ApiException(httpResponse.code(), respBody, httpResponse.headers()); 85 } 86 } catch (IOException e) { 87 throw new UncheckedIOException("Sending request to " + uri + " failed.", e); 88 } 89 } 90 91 private final String mchid; 92 private final String certificateSerialNo; 93 private final PrivateKey privateKey; 94 private final String wechatPayPublicKeyId; 95 private final PublicKey wechatPayPublicKey; 96 97 public QueryByOutRequestNo(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) { 98 this.mchid = mchid; 99 this.certificateSerialNo = certificateSerialNo; 100 this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath); 101 this.wechatPayPublicKeyId = wechatPayPublicKeyId; 102 this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath); 103 } 104 105 public static class QueryByOutRequestNoRequest { 106 @SerializedName("out_request_no") 107 @Expose(serialize = false) 108 public String outRequestNo; 109 110 @SerializedName("mchid") 111 @Expose(serialize = false) 112 public String mchid; 113 114 @SerializedName("control_type") 115 @Expose(serialize = false) 116 public ControlType controlType; 117 } 118 119 public static class ControlOrdersEntity { 120 @SerializedName("control_scene") 121 public ControlType controlScene; 122 123 @SerializedName("punish_order") 124 public PunishOrder punishOrder; 125 126 @SerializedName("recover_order") 127 public RecoverOrder recoverOrder; 128 } 129 130 public enum ControlType { 131 @SerializedName("PUNISH") 132 PUNISH, 133 @SerializedName("RECOVER") 134 RECOVER 135 } 136 137 public static class PunishOrder { 138 @SerializedName("wxpay_punish_no") 139 public String wxpayPunishNo; 140 141 @SerializedName("out_request_no") 142 public String outRequestNo; 143 144 @SerializedName("mchid") 145 public String mchid; 146 147 @SerializedName("punish_scene") 148 public Long punishScene; 149 150 @SerializedName("punish_rule_version") 151 public Long punishRuleVersion; 152 153 @SerializedName("punish_reason") 154 public String punishReason; 155 156 @SerializedName("punish_start_time") 157 public String punishStartTime; 158 159 @SerializedName("punish_end_time") 160 public String punishEndTime; 161 162 @SerializedName("punish_accept_time") 163 public String punishAcceptTime; 164 165 @SerializedName("punish_finish_time") 166 public String punishFinishTime; 167 168 @SerializedName("punish_state") 169 public PunishState punishState; 170 171 @SerializedName("effect_state") 172 public EffectState effectState; 173 174 @SerializedName("control_action") 175 public List<ControlAction> controlAction; 176 177 @SerializedName("error_message") 178 public String errorMessage; 179 180 @SerializedName("error_code") 181 public String errorCode; 182 } 183 184 public static class RecoverOrder { 185 @SerializedName("wxpay_recover_no") 186 public String wxpayRecoverNo; 187 188 @SerializedName("out_request_no") 189 public String outRequestNo; 190 191 @SerializedName("related_wxpay_punish_no") 192 public String relatedWxpayPunishNo; 193 194 @SerializedName("mchid") 195 public String mchid; 196 197 @SerializedName("punish_scene") 198 public String punishScene; 199 200 @SerializedName("punish_rule_version") 201 public String punishRuleVersion; 202 203 @SerializedName("recover_accept_time") 204 public String recoverAcceptTime; 205 206 @SerializedName("recover_finish_time") 207 public String recoverFinishTime; 208 209 @SerializedName("recover_state") 210 public RecoverState recoverState; 211 212 @SerializedName("recover_reason") 213 public String recoverReason; 214 215 @SerializedName("error_message") 216 public String errorMessage; 217 218 @SerializedName("error_code") 219 public String errorCode; 220 } 221 222 public enum PunishState { 223 @SerializedName("EXECUTING") 224 EXECUTING, 225 @SerializedName("SUCCESS") 226 SUCCESS, 227 @SerializedName("FAILED") 228 FAILED 229 } 230 231 public enum EffectState { 232 @SerializedName("ACTIVE") 233 ACTIVE, 234 @SerializedName("RECOVERED") 235 RECOVERED 236 } 237 238 public enum ControlAction { 239 @SerializedName("DISABLE_RECEIVE") 240 DISABLE_RECEIVE, 241 @SerializedName("DISABLE_WITHDRAWAL") 242 DISABLE_WITHDRAWAL, 243 @SerializedName("DISABLE_PAY") 244 DISABLE_PAY, 245 @SerializedName("DISABLE_REFUND") 246 DISABLE_REFUND, 247 @SerializedName("DISABLE_CLOSE_MERCHANT") 248 DISABLE_CLOSE_MERCHANT 249 } 250 251 public enum RecoverState { 252 @SerializedName("EXECUTING") 253 EXECUTING, 254 @SerializedName("SUCCESS") 255 SUCCESS, 256 @SerializedName("FAILED") 257 FAILED 258 } 259 260} 261
需配合微信支付工具库 wxpay_utility 使用,请参考Go
1package main 2 3import ( 4 "demo/wxpay_utility" // 引用微信支付工具库,参考 https://pay.weixin.qq.com/doc/v3/merchant/4015119334 5 "encoding/json" 6 "fmt" 7 "net/http" 8 "net/url" 9 "strings" 10 "time" 11) 12 13func main() { 14 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/merchant/4013070756 15 config, err := wxpay_utility.CreateMchConfig( 16 "19xxxxxxxx", // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756 17 "1DDE55AD98Exxxxxxxxxx", // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053 18 "/path/to/apiclient_key.pem", // 商户API证书私钥文件路径,本地文件路径 19 "PUB_KEY_ID_xxxxxxxxxxxxx", // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013038816 20 "/path/to/wxp_pub.pem", // 微信支付公钥文件路径,本地文件路径 21 ) 22 if err != nil { 23 fmt.Println(err) 24 return 25 } 26 27 request := &QueryByOutRequestNoRequest{ 28 ControlType: CONTROLTYPE_PUNISH.Ptr(), 29 OutRequestNo: wxpay_utility.String("OutRequestNo_example"), 30 Mchid: wxpay_utility.String("Mchid_example"), 31 } 32 33 response, err := QueryByOutRequestNo(config, request) 34 if err != nil { 35 fmt.Printf("请求失败: %+v\n", err) 36 // TODO: 请求失败,根据状态码执行不同的处理 37 return 38 } 39 40 // TODO: 请求成功,继续业务逻辑 41 fmt.Printf("请求成功: %+v\n", response) 42} 43 44func QueryByOutRequestNo(config *wxpay_utility.MchConfig, request *QueryByOutRequestNoRequest) (response *ControlOrdersEntity, err error) { 45 const ( 46 host = "https://api.mch.weixin.qq.com" 47 method = "GET" 48 path = "/v3/aggracct-bc/wb-channel/control-orders/{out_request_no}" 49 ) 50 51 reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path)) 52 if err != nil { 53 return nil, err 54 } 55 reqUrl.Path = strings.Replace(reqUrl.Path, "{out_request_no}", url.PathEscape(*request.OutRequestNo), -1) 56 query := reqUrl.Query() 57 if request.ControlType != nil { 58 query.Add("control_type", fmt.Sprintf("%v", *request.ControlType)) 59 } 60 if request.Mchid != nil { 61 query.Add("mchid", *request.Mchid) 62 } 63 reqUrl.RawQuery = query.Encode() 64 httpRequest, err := http.NewRequest(method, reqUrl.String(), nil) 65 if err != nil { 66 return nil, err 67 } 68 httpRequest.Header.Set("Accept", "application/json") 69 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId()) 70 authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), nil) 71 if err != nil { 72 return nil, err 73 } 74 httpRequest.Header.Set("Authorization", authorization) 75 76 client := &http.Client{} 77 httpResponse, err := client.Do(httpRequest) 78 if err != nil { 79 return nil, err 80 } 81 respBody, err := wxpay_utility.ExtractResponseBody(httpResponse) 82 if err != nil { 83 return nil, err 84 } 85 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 { 86 // 2XX 成功,验证应答签名 87 err = wxpay_utility.ValidateResponse( 88 config.WechatPayPublicKeyId(), 89 config.WechatPayPublicKey(), 90 &httpResponse.Header, 91 respBody, 92 ) 93 if err != nil { 94 return nil, err 95 } 96 response := &ControlOrdersEntity{} 97 if err := json.Unmarshal(respBody, response); err != nil { 98 return nil, err 99 } 100 101 return response, nil 102 } else { 103 return nil, wxpay_utility.NewApiException( 104 httpResponse.StatusCode, 105 httpResponse.Header, 106 respBody, 107 ) 108 } 109} 110 111type QueryByOutRequestNoRequest struct { 112 OutRequestNo *string `json:"out_request_no,omitempty"` 113 Mchid *string `json:"mchid,omitempty"` 114 ControlType *ControlType `json:"control_type,omitempty"` 115} 116 117func (o *QueryByOutRequestNoRequest) MarshalJSON() ([]byte, error) { 118 type Alias QueryByOutRequestNoRequest 119 a := &struct { 120 OutRequestNo *string `json:"out_request_no,omitempty"` 121 Mchid *string `json:"mchid,omitempty"` 122 ControlType *ControlType `json:"control_type,omitempty"` 123 *Alias 124 }{ 125 // 序列化时移除非 Body 字段 126 OutRequestNo: nil, 127 Mchid: nil, 128 ControlType: nil, 129 Alias: (*Alias)(o), 130 } 131 return json.Marshal(a) 132} 133 134type ControlOrdersEntity struct { 135 ControlScene *ControlType `json:"control_scene,omitempty"` 136 PunishOrder *PunishOrder `json:"punish_order,omitempty"` 137 RecoverOrder *RecoverOrder `json:"recover_order,omitempty"` 138} 139 140type ControlType string 141 142func (e ControlType) Ptr() *ControlType { 143 return &e 144} 145 146const ( 147 CONTROLTYPE_PUNISH ControlType = "PUNISH" 148 CONTROLTYPE_RECOVER ControlType = "RECOVER" 149) 150 151type PunishOrder struct { 152 WxpayPunishNo *string `json:"wxpay_punish_no,omitempty"` 153 OutRequestNo *string `json:"out_request_no,omitempty"` 154 Mchid *string `json:"mchid,omitempty"` 155 PunishScene *int64 `json:"punish_scene,omitempty"` 156 PunishRuleVersion *int64 `json:"punish_rule_version,omitempty"` 157 PunishReason *string `json:"punish_reason,omitempty"` 158 PunishStartTime *string `json:"punish_start_time,omitempty"` 159 PunishEndTime *string `json:"punish_end_time,omitempty"` 160 PunishAcceptTime *string `json:"punish_accept_time,omitempty"` 161 PunishFinishTime *string `json:"punish_finish_time,omitempty"` 162 PunishState *PunishState `json:"punish_state,omitempty"` 163 EffectState *EffectState `json:"effect_state,omitempty"` 164 ControlAction []ControlAction `json:"control_action,omitempty"` 165 ErrorMessage *string `json:"error_message,omitempty"` 166 ErrorCode *string `json:"error_code,omitempty"` 167} 168 169type RecoverOrder struct { 170 WxpayRecoverNo *string `json:"wxpay_recover_no,omitempty"` 171 OutRequestNo *string `json:"out_request_no,omitempty"` 172 RelatedWxpayPunishNo *string `json:"related_wxpay_punish_no,omitempty"` 173 Mchid *string `json:"mchid,omitempty"` 174 PunishScene *string `json:"punish_scene,omitempty"` 175 PunishRuleVersion *string `json:"punish_rule_version,omitempty"` 176 RecoverAcceptTime *string `json:"recover_accept_time,omitempty"` 177 RecoverFinishTime *time.Time `json:"recover_finish_time,omitempty"` 178 RecoverState *RecoverState `json:"recover_state,omitempty"` 179 RecoverReason *string `json:"recover_reason,omitempty"` 180 ErrorMessage *string `json:"error_message,omitempty"` 181 ErrorCode *string `json:"error_code,omitempty"` 182} 183 184type PunishState string 185 186func (e PunishState) Ptr() *PunishState { 187 return &e 188} 189 190const ( 191 PUNISHSTATE_EXECUTING PunishState = "EXECUTING" 192 PUNISHSTATE_SUCCESS PunishState = "SUCCESS" 193 PUNISHSTATE_FAILED PunishState = "FAILED" 194) 195 196type EffectState string 197 198func (e EffectState) Ptr() *EffectState { 199 return &e 200} 201 202const ( 203 EFFECTSTATE_ACTIVE EffectState = "ACTIVE" 204 EFFECTSTATE_RECOVERED EffectState = "RECOVERED" 205) 206 207type ControlAction string 208 209func (e ControlAction) Ptr() *ControlAction { 210 return &e 211} 212 213const ( 214 CONTROLACTION_DISABLE_RECEIVE ControlAction = "DISABLE_RECEIVE" 215 CONTROLACTION_DISABLE_WITHDRAWAL ControlAction = "DISABLE_WITHDRAWAL" 216 CONTROLACTION_DISABLE_PAY ControlAction = "DISABLE_PAY" 217 CONTROLACTION_DISABLE_REFUND ControlAction = "DISABLE_REFUND" 218 CONTROLACTION_DISABLE_CLOSE_MERCHANT ControlAction = "DISABLE_CLOSE_MERCHANT" 219) 220 221type RecoverState string 222 223func (e RecoverState) Ptr() *RecoverState { 224 return &e 225} 226 227const ( 228 RECOVERSTATE_EXECUTING RecoverState = "EXECUTING" 229 RECOVERSTATE_SUCCESS RecoverState = "SUCCESS" 230 RECOVERSTATE_FAILED RecoverState = "FAILED" 231) 232
应答参数
200 OK
control_scene 必填 string
【控制场景】 控制场景
可选取值
PUNISH
: 管控RECOVER
: 解管
punish_order 选填 object
【管控单】 控制场景为管控时返回
属性 | |
wxpay_punish_no 必填 string 【微信管控单号】 微信管控单号 out_request_no 必填 string 【微众管控单号】 微众管控单号 mchid 必填 string 【目标下管商户号】 目标下管商户号 punish_scene 必填 integer 【管控场景】 微众事先在管控系统登记好的场景ID punish_rule_version 必填 integer 【管控场景规则版本号】 管控场景对应的业务规则发生变化后,规则版本号加1 punish_reason 选填 string 【管控原因】 仅支持UTF8可见字符。微众管控原因的具体描述,用于后续产品分析对账。例如“xxx接口核验xxx字段不通过”。 punish_start_time 选填 string 【管控开始时间】 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 punish_end_time 选填 string 【管控结束时间】 管控到期自动解管,默认为长期。遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 punish_accept_time 必填 string 【管控受理时间】 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 punish_finish_time 选填 string 【管控执行完成时间】 微信支付下管完成的时间。遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 punish_state 必填 string 【管控状态】 管控单的状态 可选取值
effect_state 选填 string 【生效状态】 这条管控当前是否生效或已解管,管控单状态为执行成功才返回。 可选取值
control_action 选填 array[string] 【管控方案】 微信支付侧基于管控场景对商户号发起的管控,枚举值: 不可收款,不可提现,不可付款,不可退款,关闭商户注销 可选取值
error_message 选填 string 【执行失败错误信息】 系统执行失败的时候返回的错误信息 error_code 选填 string 【执行失败错误码】 系统执行失败的时候返回的错误码 |
recover_order 选填 object
【解管单】 控制场景为解管时返回
属性 | |
wxpay_recover_no 必填 string 【微信解管单号】 微信解管单号 out_request_no 必填 string 【微众解管单号】 解管时微众传入的外部单号 related_wxpay_punish_no 必填 string 【关联微信管控单号】 对应管控时的微信单号 mchid 必填 string 【目标解管商户号】 微信商户号 punish_scene 必填 string 【管控场景】 微众事先登记的管控场景ID punish_rule_version 必填 string 【管控场景规则版本号】 管控场景对应的业务规则发生变化后,规则版本号加1 recover_accept_time 必填 string 【解管受理时间】 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 recover_finish_time 必填 string 【解管执行完成时间】 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 recover_state 必填 string 【解管状态】 解管单的状态 可选取值
recover_reason 必填 string 【解管原因】 解管原因 error_message 选填 string 【执行失败错误信息】 系统执行失败的时候返回的错误信息 error_code 选填 string 【执行失败错误码】 系统执行失败的时候返回的错误码 |
应答示例
200 OK
1{ 2 "control_scene" : "PUNISH", 3 "punish_order" : { 4 "wxpay_punish_no" : "example_wxpay_punish_no", 5 "out_request_no" : "example_out_request_no", 6 "mchid" : "example_mchid", 7 "punish_scene" : 1, 8 "punish_rule_version" : 1, 9 "punish_reason" : "example_punish_reason", 10 "punish_start_time" : "2015-05-20T13:29:35+08:00", 11 "punish_end_time" : "2015-05-20T13:29:35+08:00", 12 "punish_accept_time" : "2015-05-20T13:29:35+08:00", 13 "punish_finish_time" : "2015-05-20T13:29:35+08:00", 14 "punish_state" : "EXECUTING", 15 "effect_state" : "ACTIVE", 16 "control_action" : [ 17 "DISABLE_RECEIVE" 18 ], 19 "error_message" : "example_error_message", 20 "error_code" : "example_error_code" 21 }, 22 "recover_order" : { 23 "wxpay_recover_no" : "example_wxpay_recover_no", 24 "out_request_no" : "example_out_request_no", 25 "related_wxpay_punish_no" : "example_related_wxpay_punish_no", 26 "mchid" : "example_mchid", 27 "punish_scene" : "example_punish_scene", 28 "punish_rule_version" : "example_punish_rule_version", 29 "recover_accept_time" : "2015-05-20T13:29:35+08:00", 30 "recover_finish_time" : "2015-05-20T13:29:35+08:00", 31 "recover_state" : "EXECUTING", 32 "recover_reason" : "example_recover_reason", 33 "error_message" : "example_error_message", 34 "error_code" : "example_error_code" 35 } 36} 37
错误码
公共错误码
状态码 | 错误码 | 描述 | 解决方案 |
---|---|---|---|
400 | PARAM_ERROR | 参数错误 | 请根据错误提示正确传入参数 |
400 | INVALID_REQUEST | HTTP 请求不符合微信支付 APIv3 接口规则 | 请参阅 接口规则 |
401 | SIGN_ERROR | 验证不通过 | 请参阅 签名常见问题 |
500 | SYSTEM_ERROR | 系统异常,请稍后重试 | 请稍后重试 |
业务错误码
状态码 | 错误码 | 描述 | 解决方案 |
---|---|---|---|
404 | NOT_FOUND | 控制单不存在 | 请检查传入的微众管控\解管单号是否正确 |
404 | NOT_FOUND | 目标商户号不存在 | 请检查目标商户号是否正确 |