关闭二级商户充值
更新时间:2025.07.29以下情况可调用关单接口:1、商家操作超出规定时间限制,为防止重复处理。2、系统主动终止服务不再接受新的请求
接口说明
支持商户:【平台商户】
请求方式:【POST】/v3/platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}/close
请求域名:【主域名】https://api.mch.weixin.qq.com 使用该域名将访问就近的接入点
【备域名】https://api2.mch.weixin.qq.com 使用该域名将访问异地的接入点 ,指引点击查看
请求参数
Header HTTP头参数
Authorization 必填 string
请参考签名认证生成认证信息
Accept 必填 string
请设置为application/json
path 路径参数
out_recharge_no 必填 string(64)
【商户充值单号】 商户系统内部的充值单号,只能由数字、大小写字母组成,在平台商户系统内部唯一
query 查询参数
sub_mchid 必填 string(32)
【二级商户号】 二级商户号
请求示例
POST
1curl -X POST \ 2 https://api.mch.weixin.qq.com/v3/platsolution/ecommerce/recharges/out-recharge-no/cz2020042013/close?sub_mchid=1900102208 \ 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/partner/4014985777 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 PlatSolutionClose { 26 private static String HOST = "https://api.mch.weixin.qq.com"; 27 private static String METHOD = "POST"; 28 private static String PATH = "/v3/platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}/close"; 29 30 public static void main(String[] args) { 31 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/partner/4013080340 32 PlatSolutionClose client = new PlatSolutionClose( 33 "19xxxxxxxx", // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/partner/4013080340 34 "1DDE55AD98Exxxxxxxxxx", // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013058924 35 "/path/to/apiclient_key.pem", // 商户API证书私钥文件路径,本地文件路径 36 "PUB_KEY_ID_xxxxxxxxxxxxx", // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013038589 37 "/path/to/wxp_pub.pem" // 微信支付公钥文件路径,本地文件路径 38 ); 39 40 PlatSolutionCloseRequest request = new PlatSolutionCloseRequest(); 41 request.outRechargeNo = "cz2020042013"; 42 request.subMchid = "1900102208"; 43 try { 44 MchDeposit response = client.run(request); 45 // TODO: 请求成功,继续业务逻辑 46 System.out.println(response); 47 } catch (WXPayUtility.ApiException e) { 48 // TODO: 请求失败,根据状态码执行不同的逻辑 49 e.printStackTrace(); 50 } 51 } 52 53 public MchDeposit run(PlatSolutionCloseRequest request) { 54 String uri = PATH; 55 uri = uri.replace("{out_recharge_no}", WXPayUtility.urlEncode(request.outRechargeNo)); 56 Map<String, Object> args = new HashMap<>(); 57 args.put("sub_mchid", request.subMchid); 58 String queryString = WXPayUtility.urlEncode(args); 59 if (!queryString.isEmpty()) { 60 uri = uri + "?" + queryString; 61 } 62 63 Request.Builder reqBuilder = new Request.Builder().url(HOST + uri); 64 reqBuilder.addHeader("Accept", "application/json"); 65 reqBuilder.addHeader("Wechatpay-Serial", wechatPayPublicKeyId); 66 reqBuilder.addHeader("Authorization", WXPayUtility.buildAuthorization(mchid, certificateSerialNo, privateKey, METHOD, uri, null)); 67 reqBuilder.addHeader("Content-Type", "application/json"); 68 RequestBody emptyBody = RequestBody.create(null, ""); 69 reqBuilder.method(METHOD, emptyBody); 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, MchDeposit.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 PlatSolutionClose(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 PlatSolutionCloseRequest { 106 @SerializedName("sub_mchid") 107 @Expose(serialize = false) 108 public String subMchid; 109 110 @SerializedName("out_recharge_no") 111 @Expose(serialize = false) 112 public String outRechargeNo; 113 } 114 115 public static class MchDeposit { 116 @SerializedName("sp_mchid") 117 public String spMchid; 118 119 @SerializedName("sub_mchid") 120 public String subMchid; 121 122 @SerializedName("recharge_id") 123 public String rechargeId; 124 125 @SerializedName("out_recharge_no") 126 public String outRechargeNo; 127 128 @SerializedName("recharge_channel") 129 public RechargeChannel rechargeChannel; 130 131 @SerializedName("account_type") 132 public AccountType accountType; 133 134 @SerializedName("recharge_state") 135 public RechargeState rechargeState; 136 137 @SerializedName("recharge_scene") 138 public RechargeScene rechargeScene; 139 140 @SerializedName("recharge_state_desc") 141 public String rechargeStateDesc; 142 143 @SerializedName("recharge_amount") 144 public RechargeAmount rechargeAmount; 145 146 @SerializedName("bank_transfer_info") 147 public BankTransferInfo bankTransferInfo; 148 149 @SerializedName("qr_recharge_info") 150 public QrRechargeInfo qrRechargeInfo; 151 152 @SerializedName("online_bank_recharge_info") 153 public OnlineBankRechargeInfo onlineBankRechargeInfo; 154 155 @SerializedName("accept_time") 156 public String acceptTime; 157 158 @SerializedName("success_time") 159 public String successTime; 160 161 @SerializedName("close_time") 162 public String closeTime; 163 164 @SerializedName("available_recharge_channels") 165 public List<RechargeChannel> availableRechargeChannels; 166 } 167 168 public enum RechargeChannel { 169 @SerializedName("BANK_TRANSFER") 170 BANK_TRANSFER, 171 @SerializedName("QR_RECHARGE") 172 QR_RECHARGE, 173 @SerializedName("ONLINE_BANK") 174 ONLINE_BANK 175 } 176 177 public enum AccountType { 178 @SerializedName("DEPOSIT") 179 DEPOSIT, 180 @SerializedName("OPERATION") 181 OPERATION 182 } 183 184 public enum RechargeState { 185 @SerializedName("SUCCESS") 186 SUCCESS, 187 @SerializedName("RECHARGING") 188 RECHARGING, 189 @SerializedName("CLOSED") 190 CLOSED 191 } 192 193 public enum RechargeScene { 194 @SerializedName("ECOMMERCE_DEPOSIT") 195 ECOMMERCE_DEPOSIT, 196 @SerializedName("ECOMMERCE_PAYMENT") 197 ECOMMERCE_PAYMENT 198 } 199 200 public static class RechargeAmount { 201 @SerializedName("amount") 202 public Long amount; 203 204 @SerializedName("currency") 205 public String currency; 206 } 207 208 public static class BankTransferInfo { 209 @SerializedName("bill_no") 210 public String billNo; 211 212 @SerializedName("memo") 213 public String memo; 214 215 @SerializedName("return_time") 216 public String returnTime; 217 218 @SerializedName("return_reason") 219 public String returnReason; 220 221 @SerializedName("bank_name") 222 public String bankName; 223 224 @SerializedName("bank_card_tail") 225 public String bankCardTail; 226 227 @SerializedName("bank_account_name") 228 public String bankAccountName; 229 } 230 231 public static class QrRechargeInfo { 232 @SerializedName("openid") 233 public String openid; 234 235 @SerializedName("employee_type") 236 public EmployeeType employeeType; 237 238 @SerializedName("transaction_id") 239 public String transactionId; 240 } 241 242 public static class OnlineBankRechargeInfo { 243 @SerializedName("bill_no") 244 public String billNo; 245 246 @SerializedName("return_time") 247 public String returnTime; 248 249 @SerializedName("return_reason") 250 public String returnReason; 251 252 @SerializedName("bank_name") 253 public String bankName; 254 255 @SerializedName("online_bank_type") 256 public OnlineBankType onlineBankType; 257 258 @SerializedName("bank_card_tail") 259 public String bankCardTail; 260 261 @SerializedName("bank_account_name") 262 public String bankAccountName; 263 } 264 265 public enum EmployeeType { 266 @SerializedName("ADMIN") 267 ADMIN, 268 @SerializedName("STAFF") 269 STAFF, 270 @SerializedName("LEGAL_PERSON") 271 LEGAL_PERSON 272 } 273 274 public enum OnlineBankType { 275 @SerializedName("ONLINE_BANK_TYPE_CORPORATE") 276 ONLINE_BANK_TYPE_CORPORATE, 277 @SerializedName("ONLINE_BANK_TYPE_PERSONAL") 278 ONLINE_BANK_TYPE_PERSONAL 279 } 280 281} 282
需配合微信支付工具库 wxpay_utility 使用,请参考Go
1package main 2 3import ( 4 "demo/wxpay_utility" // 引用微信支付工具库,参考 https://pay.weixin.qq.com/doc/v3/partner/4015119446 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/partner/4013080340 15 config, err := wxpay_utility.CreateMchConfig( 16 "19xxxxxxxx", // 商户号,是由微信支付系统生成并分配给每个商户的唯一标识符,商户号获取方式参考 https://pay.weixin.qq.com/doc/v3/partner/4013080340 17 "1DDE55AD98Exxxxxxxxxx", // 商户API证书序列号,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013058924 18 "/path/to/apiclient_key.pem", // 商户API证书私钥文件路径,本地文件路径 19 "PUB_KEY_ID_xxxxxxxxxxxxx", // 微信支付公钥ID,如何获取请参考 https://pay.weixin.qq.com/doc/v3/partner/4013038589 20 "/path/to/wxp_pub.pem", // 微信支付公钥文件路径,本地文件路径 21 ) 22 if err != nil { 23 fmt.Println(err) 24 return 25 } 26 27 request := &PlatSolutionCloseRequest{ 28 SubMchid: wxpay_utility.String("1900102208"), 29 OutRechargeNo: wxpay_utility.String("cz2020042013"), 30 } 31 32 response, err := PlatSolutionClose(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 PlatSolutionClose(config *wxpay_utility.MchConfig, request *PlatSolutionCloseRequest) (response *MchDeposit, err error) { 44 const ( 45 host = "https://api.mch.weixin.qq.com" 46 method = "POST" 47 path = "/v3/platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}/close" 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, "{out_recharge_no}", url.PathEscape(*request.OutRechargeNo), -1) 55 query := reqUrl.Query() 56 if request.SubMchid != nil { 57 query.Add("sub_mchid", *request.SubMchid) 58 } 59 reqUrl.RawQuery = query.Encode() 60 httpRequest, err := http.NewRequest(method, reqUrl.String(), nil) 61 if err != nil { 62 return nil, err 63 } 64 httpRequest.Header.Set("Accept", "application/json") 65 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId()) 66 httpRequest.Header.Set("Content-Type", "application/json") 67 authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), nil) 68 if err != nil { 69 return nil, err 70 } 71 httpRequest.Header.Set("Authorization", authorization) 72 73 client := &http.Client{} 74 httpResponse, err := client.Do(httpRequest) 75 if err != nil { 76 return nil, err 77 } 78 respBody, err := wxpay_utility.ExtractResponseBody(httpResponse) 79 if err != nil { 80 return nil, err 81 } 82 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 { 83 // 2XX 成功,验证应答签名 84 err = wxpay_utility.ValidateResponse( 85 config.WechatPayPublicKeyId(), 86 config.WechatPayPublicKey(), 87 &httpResponse.Header, 88 respBody, 89 ) 90 if err != nil { 91 return nil, err 92 } 93 response := &MchDeposit{} 94 if err := json.Unmarshal(respBody, response); err != nil { 95 return nil, err 96 } 97 98 return response, nil 99 } else { 100 return nil, wxpay_utility.NewApiException( 101 httpResponse.StatusCode, 102 httpResponse.Header, 103 respBody, 104 ) 105 } 106} 107 108type PlatSolutionCloseRequest struct { 109 SubMchid *string `json:"sub_mchid,omitempty"` 110 OutRechargeNo *string `json:"out_recharge_no,omitempty"` 111} 112 113func (o *PlatSolutionCloseRequest) MarshalJSON() ([]byte, error) { 114 type Alias PlatSolutionCloseRequest 115 a := &struct { 116 SubMchid *string `json:"sub_mchid,omitempty"` 117 OutRechargeNo *string `json:"out_recharge_no,omitempty"` 118 *Alias 119 }{ 120 // 序列化时移除非 Body 字段 121 SubMchid: nil, 122 OutRechargeNo: nil, 123 Alias: (*Alias)(o), 124 } 125 return json.Marshal(a) 126} 127 128type MchDeposit struct { 129 SpMchid *string `json:"sp_mchid,omitempty"` 130 SubMchid *string `json:"sub_mchid,omitempty"` 131 RechargeId *string `json:"recharge_id,omitempty"` 132 OutRechargeNo *string `json:"out_recharge_no,omitempty"` 133 RechargeChannel *RechargeChannel `json:"recharge_channel,omitempty"` 134 AccountType *AccountType `json:"account_type,omitempty"` 135 RechargeState *RechargeState `json:"recharge_state,omitempty"` 136 RechargeScene *RechargeScene `json:"recharge_scene,omitempty"` 137 RechargeStateDesc *string `json:"recharge_state_desc,omitempty"` 138 RechargeAmount *RechargeAmount `json:"recharge_amount,omitempty"` 139 BankTransferInfo *BankTransferInfo `json:"bank_transfer_info,omitempty"` 140 QrRechargeInfo *QrRechargeInfo `json:"qr_recharge_info,omitempty"` 141 OnlineBankRechargeInfo *OnlineBankRechargeInfo `json:"online_bank_recharge_info,omitempty"` 142 AcceptTime *time.Time `json:"accept_time,omitempty"` 143 SuccessTime *time.Time `json:"success_time,omitempty"` 144 CloseTime *time.Time `json:"close_time,omitempty"` 145 AvailableRechargeChannels []RechargeChannel `json:"available_recharge_channels,omitempty"` 146} 147 148type RechargeChannel string 149 150func (e RechargeChannel) Ptr() *RechargeChannel { 151 return &e 152} 153 154const ( 155 RECHARGECHANNEL_BANK_TRANSFER RechargeChannel = "BANK_TRANSFER" 156 RECHARGECHANNEL_QR_RECHARGE RechargeChannel = "QR_RECHARGE" 157 RECHARGECHANNEL_ONLINE_BANK RechargeChannel = "ONLINE_BANK" 158) 159 160type AccountType string 161 162func (e AccountType) Ptr() *AccountType { 163 return &e 164} 165 166const ( 167 ACCOUNTTYPE_DEPOSIT AccountType = "DEPOSIT" 168 ACCOUNTTYPE_OPERATION AccountType = "OPERATION" 169) 170 171type RechargeState string 172 173func (e RechargeState) Ptr() *RechargeState { 174 return &e 175} 176 177const ( 178 RECHARGESTATE_SUCCESS RechargeState = "SUCCESS" 179 RECHARGESTATE_RECHARGING RechargeState = "RECHARGING" 180 RECHARGESTATE_CLOSED RechargeState = "CLOSED" 181) 182 183type RechargeScene string 184 185func (e RechargeScene) Ptr() *RechargeScene { 186 return &e 187} 188 189const ( 190 RECHARGESCENE_ECOMMERCE_DEPOSIT RechargeScene = "ECOMMERCE_DEPOSIT" 191 RECHARGESCENE_ECOMMERCE_PAYMENT RechargeScene = "ECOMMERCE_PAYMENT" 192) 193 194type RechargeAmount struct { 195 Amount *int64 `json:"amount,omitempty"` 196 Currency *string `json:"currency,omitempty"` 197} 198 199type BankTransferInfo struct { 200 BillNo *string `json:"bill_no,omitempty"` 201 Memo *string `json:"memo,omitempty"` 202 ReturnTime *time.Time `json:"return_time,omitempty"` 203 ReturnReason *string `json:"return_reason,omitempty"` 204 BankName *string `json:"bank_name,omitempty"` 205 BankCardTail *string `json:"bank_card_tail,omitempty"` 206 BankAccountName *string `json:"bank_account_name,omitempty"` 207} 208 209type QrRechargeInfo struct { 210 Openid *string `json:"openid,omitempty"` 211 EmployeeType *EmployeeType `json:"employee_type,omitempty"` 212 TransactionId *string `json:"transaction_id,omitempty"` 213} 214 215type OnlineBankRechargeInfo struct { 216 BillNo *string `json:"bill_no,omitempty"` 217 ReturnTime *time.Time `json:"return_time,omitempty"` 218 ReturnReason *string `json:"return_reason,omitempty"` 219 BankName *string `json:"bank_name,omitempty"` 220 OnlineBankType *OnlineBankType `json:"online_bank_type,omitempty"` 221 BankCardTail *string `json:"bank_card_tail,omitempty"` 222 BankAccountName *string `json:"bank_account_name,omitempty"` 223} 224 225type EmployeeType string 226 227func (e EmployeeType) Ptr() *EmployeeType { 228 return &e 229} 230 231const ( 232 EMPLOYEETYPE_ADMIN EmployeeType = "ADMIN" 233 EMPLOYEETYPE_STAFF EmployeeType = "STAFF" 234 EMPLOYEETYPE_LEGAL_PERSON EmployeeType = "LEGAL_PERSON" 235) 236 237type OnlineBankType string 238 239func (e OnlineBankType) Ptr() *OnlineBankType { 240 return &e 241} 242 243const ( 244 ONLINEBANKTYPE_ONLINE_BANK_TYPE_CORPORATE OnlineBankType = "ONLINE_BANK_TYPE_CORPORATE" 245 ONLINEBANKTYPE_ONLINE_BANK_TYPE_PERSONAL OnlineBankType = "ONLINE_BANK_TYPE_PERSONAL" 246) 247
应答参数
折叠全部参数
200 OK
sp_mchid 必填 string(32)
【平台商户号】 微信支付分配的商户号
sub_mchid 必填 string(32)
【二级商户号】 微信支付分配的商户号,充值商户号
recharge_id 必填 string(27)
【微信支付充值单号】 微信支付充值单号
out_recharge_no 必填 string(64)
【商户充值单号】 商户系统内部的充值单号,只能由数字、大小写字母组成,在平台商户系统内部唯一
recharge_channel 选填 string
【充值渠道】 仅在“充值成功”时返回,其它状态不返回
可选取值
BANK_TRANSFER: 银行转账QR_RECHARGE: 扫码充值ONLINE_BANK: 网银充值
account_type 必填 string
【充值入账账户】 充值入账账户
可选取值
DEPOSIT: 保证金账户OPERATION: 运营账户
recharge_state 必填 string
【充值状态】 充值状态
可选取值
SUCCESS: 充值成功RECHARGING: 充值中CLOSED: 已关闭
recharge_scene 必填 string
【充值场景】 充值场景
可选取值
ECOMMERCE_DEPOSIT: 二级商户充值保证金ECOMMERCE_PAYMENT: 二级商户充值运营资金
recharge_state_desc 选填 string(64)
【充值状态描述】 展示关闭充值的原因,如“平台商户主动关闭充值单”、“超过时间限制,系统自动关闭充值单”等
recharge_amount 必填 object
【充值金额】 单位为分,仅支持CNY。单笔限额规则:1、银行转账最多8亿元 2、扫码充值5万元
| 属性 | |
amount 选填 integer 【总金额】 单位为分 currency 选填 string(16) 【货币类型】 人民币为CNY |
bank_transfer_info 选填 object
【转账充值的付款信息】 包括付款账户、银行附言等内容
| 属性 | |
bill_no 选填 string(64) 【转入的银行流水单号】 转入的银行流水单号 memo 选填 string(1024) 【转账充值附言】 转账充值附言 return_time 选填 string(32) 【银行转账退回时间】 使用rfc3339标准格式 return_reason 选填 string(256) 【银行转账退回原因】 银行转账退回原因 bank_name 选填 string(128) 【开户银行名称】 开户银行名称 bank_card_tail 选填 string(4) 【银行卡号后四位】 银行卡号后四位 bank_account_name 选填 string(512) 【银行账户名称】 银行账户名称 |
qr_recharge_info 选填 object
【扫码充值的付款信息】 包括充值用户OpenID
| 属性 | |
openid 选填 string(64) 【用户 employee_type 选填 string 【员工类型】 员工类型 可选取值
transaction_id 选填 string(32) 【微信支付订单号】 微信付款的支付订单号 |
online_bank_recharge_info 选填 object
【网银充值的付款信息】 包括付款账户、银行交易订单号等内容
| 属性 | |
bill_no 选填 string(64) 【银行交易订单号】 银行交易订单号 return_time 选填 string(32) 【网银充值退回时间】 使用rfc3339标准格式 return_reason 选填 string(256) 【网银充值退回原因】 网银充值退回原因 bank_name 选填 string(128) 【开户银行名称】 开户银行名称 online_bank_type 选填 string 【网银类型】 网银类型 可选取值
bank_card_tail 选填 string(4) 【银行卡号后四位】 银行卡号后四位 bank_account_name 选填 string(512) 【银行账户名称】 银行账户名称 |
accept_time 选填 string(32)
【受理充值时间】 微信支付成功受理充值时间,不代表充值已经完成,使用rfc3339标准格式
success_time 选填 string(32)
【充值成功时间】 当状态为“充值成功”时返回,使用rfc3339标准格式
close_time 选填 string(32)
【关闭充值时间】 当状态为“已关闭”时返回,使用rfc3339标准格式
available_recharge_channels 选填 array[string]
【可用充值渠道列表】 申请充值时传入的可用渠道列表
可选取值
BANK_TRANSFER: 银行转账QR_RECHARGE: 扫码充值ONLINE_BANK: 网银充值
应答示例
200 OK
1{ 2 "sp_mchid" : "1900001109", 3 "sub_mchid" : "1900001121", 4 "recharge_id" : "172234484162395401", 5 "out_recharge_no" : "cz2020042013", 6 "recharge_channel" : "BANK_TRANSFER", 7 "account_type" : "DEPOSIT", 8 "recharge_state" : "SUCCESS", 9 "recharge_scene" : "ECOMMERCE_DEPOSIT", 10 "recharge_state_desc" : "超过时间限制,系统自动关闭充值单", 11 "recharge_amount" : { 12 "amount" : 500000, 13 "currency" : "CNY" 14 }, 15 "bank_transfer_info" : { 16 "bill_no" : "110240620400046628001252733345", 17 "memo" : "转账充值附言", 18 "return_time" : "2015-05-20T13:29:35+08:00", 19 "return_reason" : "银行转账充值金额与申请充值金额不一致", 20 "bank_name" : "中国银行", 21 "bank_card_tail" : "0722", 22 "bank_account_name" : "某某某有限公司" 23 }, 24 "qr_recharge_info" : { 25 "openid" : "owYiu0WOJdGCYxoHrPabGhI39uT4", 26 "employee_type" : "STAFF", 27 "transaction_id" : "4215463511252015071056489715" 28 }, 29 "online_bank_recharge_info" : { 30 "bill_no" : "110240620400046628001252733345", 31 "return_time" : "2015-05-20T13:29:35+08:00", 32 "return_reason" : "实际付款户名与充值单要求的付款户名不一致", 33 "bank_name" : "中国银行", 34 "online_bank_type" : "ONLINE_BANK_TYPE_CORPORATE", 35 "bank_card_tail" : "0722", 36 "bank_account_name" : "某某某有限公司" 37 }, 38 "accept_time" : "2015-05-20T13:29:35+08:00", 39 "success_time" : "2015-05-20T13:29:35+08:00", 40 "close_time" : "2015-05-20T13:29:35+08:00", 41 "available_recharge_channels" : [ 42 "BANK_TRANSFER" 43 ] 44} 45
错误码
以下是本接口返回的错误码列表。详细错误码规则,请参考微信支付接口规则-错误码和错误提示
