查询渠道结算银行账户更名申请
更新时间:2026.03.25查询渠道结算银行账户更名申请。
接口限频:单商户200/分钟
接口说明
支持商户:【普通商户】
请求方式:【GET】/v3/aggracct-bc/wb-channel/bank-channel-account/rename/{application_id}
请求域名:【主域名】https://api.mch.weixin.qq.com 使用该域名将访问就近的接入点
【备域名】https://api2.mch.weixin.qq.com 使用该域名将访问异地的接入点 ,指引点击查看
请求参数
Header HTTP头参数
Authorization 必填 string
请参考签名认证生成认证信息
Accept 必填 string
请设置为application/json
Wechatpay-Serial 必填 string
【微信支付公钥ID】或【微信支付平台证书序列号】 请求参数中的敏感字段,需要使用微信支付公钥加密(推荐),请参考获取微信支付公钥ID说明以及微信支付公钥加密敏感信息指引;也可以使用微信支付平台证书公钥加密,参考获取平台证书序列号、平台证书加密敏感信息指引
path 路径参数
application_id 必填 string(64)
【微信支付更名受理返回的申请单号】 调用API接口「受理渠道结算银行账户更名申请」时返回的申请单号
query 查询参数
mchid 必填 string(64)
【目标商户号】 需要修改渠道结算银行账户信息的微信支付商户号
bal_account_no 必填 string(1024)
【台账ID】 【加密】台账ID,对应微众支用账号。需要使用微信支付公钥加密(推荐),请参考获取微信支付公钥ID说明以及微信支付公钥加密敏感信息指引;也可以使用微信支付平台证书公钥加密,参考获取平台证书序列号、平台证书加密敏感信息指引
请求示例
GET
1curl -X GET \ 2 https://api.mch.weixin.qq.com/v3/aggracct-bc/wb-channel/bank-channel-account/rename/11117742499090086455469010028373?mchid=3401098624&bal_account_no=Cf80Dpbwo2cexDDB2k5W%2FDZyefMg8nCvBgty1OCebYcgxVuAgfNDLP92kc4i60odlVBmyc1%2BNo9dafz57Ydp9S9K3wAvOvumVgxQXRVGvKGP8aoB5t9UINUe378Eq2mtV2lsN5RIfLmQJOOFnw1XP28KWXTRJfndRb5aQNZ%2BLZCMZzr7%2FZeNijCpxiru0sVdqD5B7hGB724QMbY5R6amZ6%2Fgs%2FxA9sHxBB%2BAx5tOAH0r3w72dqyBOJrQutoO73C2zGc%2BiQiRETLIhuz%2FdEUvDmpsQcAFeC02qVFn51373ATCmWnABRfXzMKX32JY%2BmKgSp%2FNQcTWlAcN8nAl%2FpAOKg%3D%3D \ 3 -H "Authorization: WECHATPAY2-SHA256-RSA2048 mchid=\"1900000001\",..." \ 4 -H "Accept: application/json" \ 5 -H "Wechatpay-Serial: 5157F09EFDC096DE15EBE81A47057A7232F1B8E1" 6
需配合微信支付工具库 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 QueryRenameResult { 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/bank-channel-account/rename/{application_id}"; 29 30 public static void main(String[] args) { 31 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/merchant/4013070756 32 QueryRenameResult client = new QueryRenameResult( 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 QueryRenameResultRequest request = new QueryRenameResultRequest(); 41 request.applicationId = "11117742499090086455469010028373"; 42 request.mchid = "3401098624"; 43 request.balAccountNo = "Cf80Dpbwo2cexDDB2k5W%2FDZyefMg8nCvBgty1OCebYcgxVuAgfNDLP92kc4i60odlVBmyc1%2BNo9dafz57Ydp9S9K3wAvOvumVgxQXRVGvKGP8aoB5t9UINUe378Eq2mtV2lsN5RIfLmQJOOFnw1XP28KWXTRJfndRb5aQNZ%2BLZCMZzr7%2FZeNijCpxiru0sVdqD5B7hGB724QMbY5R6amZ6%2Fgs%2FxA9sHxBB%2BAx5tOAH0r3w72dqyBOJrQutoO73C2zGc%2BiQiRETLIhuz%2FdEUvDmpsQcAFeC02qVFn51373ATCmWnABRfXzMKX32JY%2BmKgSp%2FNQcTWlAcN8nAl%2FpAOKg%3D%3D"; 44 try { 45 BankAccountRenameResult 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 BankAccountRenameResult run(QueryRenameResultRequest request) { 55 String uri = PATH; 56 uri = uri.replace("{application_id}", WXPayUtility.urlEncode(request.applicationId)); 57 Map<String, Object> args = new HashMap<>(); 58 args.put("mchid", request.mchid); 59 args.put("bal_account_no", request.balAccountNo); 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, BankAccountRenameResult.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 QueryRenameResult(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 String encrypt(String plainText) { 106 return WXPayUtility.encrypt(this.wechatPayPublicKey, plainText); 107 } 108 109 public static class QueryRenameResultRequest { 110 @SerializedName("application_id") 111 @Expose(serialize = false) 112 public String applicationId; 113 114 @SerializedName("mchid") 115 @Expose(serialize = false) 116 public String mchid; 117 118 @SerializedName("bal_account_no") 119 @Expose(serialize = false) 120 public String balAccountNo; 121 } 122 123 public static class BankAccountRenameResult { 124 @SerializedName("change_scene") 125 public ChangeScene changeScene; 126 127 @SerializedName("application_id") 128 public String applicationId; 129 130 @SerializedName("out_request_no") 131 public String outRequestNo; 132 133 @SerializedName("mchid") 134 public String mchid; 135 136 @SerializedName("bal_account_no") 137 public String balAccountNo; 138 139 @SerializedName("new_account_name") 140 public String newAccountName; 141 142 @SerializedName("application_state") 143 public ApplicationState applicationState; 144 145 @SerializedName("finish_time") 146 public String finishTime; 147 148 @SerializedName("fail_code") 149 public FailCode failCode; 150 151 @SerializedName("fail_msg") 152 public String failMsg; 153 } 154 155 public enum ChangeScene { 156 @SerializedName("SUBJECT_INFO_RENAME") 157 SUBJECT_INFO_RENAME 158 } 159 160 public enum ApplicationState { 161 @SerializedName("PROCESSING") 162 PROCESSING, 163 @SerializedName("SUCCESS") 164 SUCCESS, 165 @SerializedName("FAIL") 166 FAIL 167 } 168 169 public enum FailCode { 170 @SerializedName("AUDIT_REJECT") 171 AUDIT_REJECT 172 } 173 174} 175
需配合微信支付工具库 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) 11 12func main() { 13 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/merchant/4013070756 14 config, err := wxpay_utility.CreateMchConfig( 15 "19xxxxxxxx", // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/merchant/4013070756 16 "1DDE55AD98Exxxxxxxxxx", // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013053053 17 "/path/to/apiclient_key.pem", // 商户API证书私钥文件路径,本地文件路径 18 "PUB_KEY_ID_xxxxxxxxxxxxx", // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/merchant/4013038816 19 "/path/to/wxp_pub.pem", // 微信支付公钥文件路径,本地文件路径 20 ) 21 if err != nil { 22 fmt.Println(err) 23 return 24 } 25 26 request := &QueryRenameResultRequest{ 27 ApplicationId: wxpay_utility.String("11117742499090086455469010028373"), 28 Mchid: wxpay_utility.String("3401098624"), 29 BalAccountNo: wxpay_utility.String("Cf80Dpbwo2cexDDB2k5W%2FDZyefMg8nCvBgty1OCebYcgxVuAgfNDLP92kc4i60odlVBmyc1%2BNo9dafz57Ydp9S9K3wAvOvumVgxQXRVGvKGP8aoB5t9UINUe378Eq2mtV2lsN5RIfLmQJOOFnw1XP28KWXTRJfndRb5aQNZ%2BLZCMZzr7%2FZeNijCpxiru0sVdqD5B7hGB724QMbY5R6amZ6%2Fgs%2FxA9sHxBB%2BAx5tOAH0r3w72dqyBOJrQutoO73C2zGc%2BiQiRETLIhuz%2FdEUvDmpsQcAFeC02qVFn51373ATCmWnABRfXzMKX32JY%2BmKgSp%2FNQcTWlAcN8nAl%2FpAOKg%3D%3D"), 30 } 31 32 response, err := QueryRenameResult(config, request) 33 if err != nil { 34 fmt.Printf("请求失败: %+v\n", err) 35 // TODO: 请求失败,根据状态码执行不同的处理 36 return 37 } 38 39 // TODO: 请求成功,继续业务逻辑 40 fmt.Printf("请求成功: %+v\n", response) 41} 42 43func QueryRenameResult(config *wxpay_utility.MchConfig, request *QueryRenameResultRequest) (response *BankAccountRenameResult, err error) { 44 const ( 45 host = "https://api.mch.weixin.qq.com" 46 method = "GET" 47 path = "/v3/aggracct-bc/wb-channel/bank-channel-account/rename/{application_id}" 48 ) 49 50 reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path)) 51 if err != nil { 52 return nil, err 53 } 54 reqUrl.Path = strings.Replace(reqUrl.Path, "{application_id}", url.PathEscape(*request.ApplicationId), -1) 55 query := reqUrl.Query() 56 if request.Mchid != nil { 57 query.Add("mchid", *request.Mchid) 58 } 59 if request.BalAccountNo != nil { 60 query.Add("bal_account_no", *request.BalAccountNo) 61 } 62 reqUrl.RawQuery = query.Encode() 63 httpRequest, err := http.NewRequest(method, reqUrl.String(), nil) 64 if err != nil { 65 return nil, err 66 } 67 httpRequest.Header.Set("Accept", "application/json") 68 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId()) 69 authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), nil) 70 if err != nil { 71 return nil, err 72 } 73 httpRequest.Header.Set("Authorization", authorization) 74 75 client := &http.Client{} 76 httpResponse, err := client.Do(httpRequest) 77 if err != nil { 78 return nil, err 79 } 80 respBody, err := wxpay_utility.ExtractResponseBody(httpResponse) 81 if err != nil { 82 return nil, err 83 } 84 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 { 85 // 2XX 成功,验证应答签名 86 err = wxpay_utility.ValidateResponse( 87 config.WechatPayPublicKeyId(), 88 config.WechatPayPublicKey(), 89 &httpResponse.Header, 90 respBody, 91 ) 92 if err != nil { 93 return nil, err 94 } 95 response := &BankAccountRenameResult{} 96 if err := json.Unmarshal(respBody, response); err != nil { 97 return nil, err 98 } 99 100 return response, nil 101 } else { 102 return nil, wxpay_utility.NewApiException( 103 httpResponse.StatusCode, 104 httpResponse.Header, 105 respBody, 106 ) 107 } 108} 109 110type QueryRenameResultRequest struct { 111 ApplicationId *string `json:"application_id,omitempty"` 112 Mchid *string `json:"mchid,omitempty"` 113 BalAccountNo *string `json:"bal_account_no,omitempty"` 114} 115 116func (o *QueryRenameResultRequest) MarshalJSON() ([]byte, error) { 117 type Alias QueryRenameResultRequest 118 a := &struct { 119 ApplicationId *string `json:"application_id,omitempty"` 120 Mchid *string `json:"mchid,omitempty"` 121 BalAccountNo *string `json:"bal_account_no,omitempty"` 122 *Alias 123 }{ 124 // 序列化时移除非 Body 字段 125 ApplicationId: nil, 126 Mchid: nil, 127 BalAccountNo: nil, 128 Alias: (*Alias)(o), 129 } 130 return json.Marshal(a) 131} 132 133type BankAccountRenameResult struct { 134 ChangeScene *ChangeScene `json:"change_scene,omitempty"` 135 ApplicationId *string `json:"application_id,omitempty"` 136 OutRequestNo *string `json:"out_request_no,omitempty"` 137 Mchid *string `json:"mchid,omitempty"` 138 BalAccountNo *string `json:"bal_account_no,omitempty"` 139 NewAccountName *string `json:"new_account_name,omitempty"` 140 ApplicationState *ApplicationState `json:"application_state,omitempty"` 141 FinishTime *string `json:"finish_time,omitempty"` 142 FailCode *FailCode `json:"fail_code,omitempty"` 143 FailMsg *string `json:"fail_msg,omitempty"` 144} 145 146type ChangeScene string 147 148func (e ChangeScene) Ptr() *ChangeScene { 149 return &e 150} 151 152const ( 153 CHANGESCENE_SUBJECT_INFO_RENAME ChangeScene = "SUBJECT_INFO_RENAME" 154) 155 156type ApplicationState string 157 158func (e ApplicationState) Ptr() *ApplicationState { 159 return &e 160} 161 162const ( 163 APPLICATIONSTATE_PROCESSING ApplicationState = "PROCESSING" 164 APPLICATIONSTATE_SUCCESS ApplicationState = "SUCCESS" 165 APPLICATIONSTATE_FAIL ApplicationState = "FAIL" 166) 167 168type FailCode string 169 170func (e FailCode) Ptr() *FailCode { 171 return &e 172} 173 174const ( 175 FAILCODE_AUDIT_REJECT FailCode = "AUDIT_REJECT" 176) 177
应答参数
200 OK
change_scene 必填 string
【变更类型】 变更类型
可选取值
SUBJECT_INFO_RENAME: 主体资料更名
application_id 必填 string(64)
【微信支付更名受理返回的申请单号】 微信支付更名受理返回的申请单号
out_request_no 必填 string(64)
【渠道结算银行账户更名外部系统单号】 渠道结算银行账户更名外部系统单号。微众内部全局唯一。微信支付仅做透传,不做幂等。
mchid 必填 string(64)
【目标商户号】 需要修改渠道结算银行账户信息的微信支付商户号
bal_account_no 必填 string(1024)
【台账ID】 【加密】台账ID,对应微众支用账号。解密请参考如何使用API证书解密敏感字段。
new_account_name 必填 string(1024)
【目标账户名】 【加密】本次渠道结算银行账户更名申请的目标账户名。解密请参考如何使用API证书解密敏感字段。
application_state 必填 string
【申请单状态】 申请单状态
可选取值
PROCESSING: 处理中SUCCESS: 成功FAIL: 最终失败
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秒。
fail_code 选填 string
【失败错误码】 失败错误码,仅申请单状态为失败时返回
可选取值
AUDIT_REJECT: 审核驳回
fail_msg 选填 string(2048)
【失败原因】 失败原因,仅申请单状态为失败时返回。最大长度2048个UTF8字符
应答示例
200 OK
1{ 2 "change_scene" : "SUBJECT_INFO_RENAME", 3 "application_id" : "11117739950510011525404734679776", 4 "out_request_no" : "2603234MF14213212593871964733440", 5 "mchid" : "3401098624", 6 "bal_account_no" : "TKaG8Vew4GN7Hn8ShYH7jhYEZM+k1JXIxra3ZwErVLY4lbVBMyHaPOky5A/YCikv9vJBeKdeYjOB3KAovc1GBRYBgpR/P2SRZ3Ebp/f6SGVcIA/mvh0gqUdTa1AlXcA7wUihhSBaqjqA1D8JbO64RUbuq4e4MWoBvwrP9ca8V7XOUflNJ9NHoiHQCa7RoL58JyaiAjoEkmtQoA/yEvzRUx8LAyHQvssL8+UZ/YNJGFeAehNgdjrWgUOx9sdaBIRF+oiCR/dIGgbQjZJ8L/EV58G0iQ+0s16/vCrHw5KwZ/RJi7VYSf95SVkh+oilwMOMKg3+2bFQXdF0imWk+W7BQA==", 7 "new_account_name" : "FMbf1tn2F0NRYCJp1BW76oVoMuzBL00kPke7DFipk5hl8sGqCNoO08ZXfjqCPs4P8Vq83BXfSWygAtVG8O5k3adgMor3G9BbF+hIugbYKYtnDC10iJdfmGOZvLGVOnrZIoMFSXw5Swwby5NVyLvME59T0dU6mo1R/St0mYypVPLwV+SG9pGo2LBC7vKzs3yWevgd5TBsaQqNP6nUNGZMURMAzGp2DYttI+q7ORuSku4HMh8WLDSnGLYvCpN+tLGS3s7hB8AB8sAm/sS5bnUM9jtbDUJ+pmj/VxTLv6WDMJu8yVoqxdCq4srEUrgvHLgmAmcE3v5LmwNg/Ew3HGglcw==", 8 "application_state" : "SUCCESS", 9 "finish_time" : "2026-03-23T15:41:34+08:00", 10 "fail_code" : "AUDIT_REJECT", 11 "fail_msg" : "身份证有效期核验不通过,请检查有效期填写是否正确" 12} 13
错误码
以下是本接口返回的错误码列表。详细错误码规则,请参考微信支付接口规则-错误码和错误提示
状态码 | 错误码 | 描述 | 解决方案 |
|---|---|---|---|
400 | PARAM_ERROR | 参数错误 | 请根据错误提示正确传入参数 |
400 | INVALID_REQUEST | HTTP 请求不符合微信支付 APIv3 接口规则 | 请参阅 接口规则 |
401 | SIGN_ERROR | 验证不通过 | 请参阅 签名常见问题 |
500 | SYSTEM_ERROR | 系统异常,请稍后重试 | 请稍后重试 |
403 | NO_AUTH | 权限异常 | 请检查 a. 发起商户是否微众技术号商户;b. 参数mchid是否微众渠道聚合商户;c. 参数mchid和bal_account_no是否匹配 |
404 | NOT_FOUND | 请求的申请单不存在 | 请检查请求参数是否正确 |
429 | FREQUENCY_LIMITED | 频率超限 | 请降低请求接口频率 |
