查询二级商户充值结果
更新时间:2025.07.29提交充值申请后,可调用该接口查询充值状态。充值到账存在延迟:
1、扫码充值:3分钟内到账
2、银行转账:一般可在10分钟内到账。受央行大额系统工作时间限制,周一至周四17:15-20:30,周五17:15-24:00,节假日全天会延迟到账
接口说明
支持商户:【平台商户】
请求方式:【GET】/v3/platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}
请求域名:【主域名】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)
【二级商户号】 二级商户号
请求示例
GET
1curl -X GET \ 2 https://api.mch.weixin.qq.com/v3/platsolution/ecommerce/recharges/out-recharge-no/cz202407181234?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 PlatSolutionGetByOutNo { 26 private static String HOST = "https://api.mch.weixin.qq.com"; 27 private static String METHOD = "GET"; 28 private static String PATH = "/v3/platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}"; 29 30 public static void main(String[] args) { 31 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/partner/4013080340 32 PlatSolutionGetByOutNo client = new PlatSolutionGetByOutNo( 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 PlatSolutionGetByOutNoRequest request = new PlatSolutionGetByOutNoRequest(); 41 request.outRechargeNo = "cz202407181234"; 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(PlatSolutionGetByOutNoRequest 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.method(METHOD, null); 68 Request httpRequest = reqBuilder.build(); 69 70 // 发送HTTP请求 71 OkHttpClient client = new OkHttpClient.Builder().build(); 72 try (Response httpResponse = client.newCall(httpRequest).execute()) { 73 String respBody = WXPayUtility.extractBody(httpResponse); 74 if (httpResponse.code() >= 200 && httpResponse.code() < 300) { 75 // 2XX 成功,验证应答签名 76 WXPayUtility.validateResponse(this.wechatPayPublicKeyId, this.wechatPayPublicKey, 77 httpResponse.headers(), respBody); 78 79 // 从HTTP应答报文构建返回数据 80 return WXPayUtility.fromJson(respBody, MchDeposit.class); 81 } else { 82 throw new WXPayUtility.ApiException(httpResponse.code(), respBody, httpResponse.headers()); 83 } 84 } catch (IOException e) { 85 throw new UncheckedIOException("Sending request to " + uri + " failed.", e); 86 } 87 } 88 89 private final String mchid; 90 private final String certificateSerialNo; 91 private final PrivateKey privateKey; 92 private final String wechatPayPublicKeyId; 93 private final PublicKey wechatPayPublicKey; 94 95 public PlatSolutionGetByOutNo(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) { 96 this.mchid = mchid; 97 this.certificateSerialNo = certificateSerialNo; 98 this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath); 99 this.wechatPayPublicKeyId = wechatPayPublicKeyId; 100 this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath); 101 } 102 103 public static class PlatSolutionGetByOutNoRequest { 104 @SerializedName("sub_mchid") 105 @Expose(serialize = false) 106 public String subMchid; 107 108 @SerializedName("out_recharge_no") 109 @Expose(serialize = false) 110 public String outRechargeNo; 111 } 112 113 public static class MchDeposit { 114 @SerializedName("sp_mchid") 115 public String spMchid; 116 117 @SerializedName("sub_mchid") 118 public String subMchid; 119 120 @SerializedName("recharge_id") 121 public String rechargeId; 122 123 @SerializedName("out_recharge_no") 124 public String outRechargeNo; 125 126 @SerializedName("recharge_channel") 127 public RechargeChannel rechargeChannel; 128 129 @SerializedName("account_type") 130 public AccountType accountType; 131 132 @SerializedName("recharge_state") 133 public RechargeState rechargeState; 134 135 @SerializedName("recharge_scene") 136 public RechargeScene rechargeScene; 137 138 @SerializedName("recharge_state_desc") 139 public String rechargeStateDesc; 140 141 @SerializedName("recharge_amount") 142 public RechargeAmount rechargeAmount; 143 144 @SerializedName("bank_transfer_info") 145 public BankTransferInfo bankTransferInfo; 146 147 @SerializedName("qr_recharge_info") 148 public QrRechargeInfo qrRechargeInfo; 149 150 @SerializedName("online_bank_recharge_info") 151 public OnlineBankRechargeInfo onlineBankRechargeInfo; 152 153 @SerializedName("accept_time") 154 public String acceptTime; 155 156 @SerializedName("success_time") 157 public String successTime; 158 159 @SerializedName("close_time") 160 public String closeTime; 161 162 @SerializedName("available_recharge_channels") 163 public List<RechargeChannel> availableRechargeChannels; 164 } 165 166 public enum RechargeChannel { 167 @SerializedName("BANK_TRANSFER") 168 BANK_TRANSFER, 169 @SerializedName("QR_RECHARGE") 170 QR_RECHARGE, 171 @SerializedName("ONLINE_BANK") 172 ONLINE_BANK 173 } 174 175 public enum AccountType { 176 @SerializedName("DEPOSIT") 177 DEPOSIT, 178 @SerializedName("OPERATION") 179 OPERATION 180 } 181 182 public enum RechargeState { 183 @SerializedName("SUCCESS") 184 SUCCESS, 185 @SerializedName("RECHARGING") 186 RECHARGING, 187 @SerializedName("CLOSED") 188 CLOSED 189 } 190 191 public enum RechargeScene { 192 @SerializedName("ECOMMERCE_DEPOSIT") 193 ECOMMERCE_DEPOSIT, 194 @SerializedName("ECOMMERCE_PAYMENT") 195 ECOMMERCE_PAYMENT 196 } 197 198 public static class RechargeAmount { 199 @SerializedName("amount") 200 public Long amount; 201 202 @SerializedName("currency") 203 public String currency; 204 } 205 206 public static class BankTransferInfo { 207 @SerializedName("bill_no") 208 public String billNo; 209 210 @SerializedName("memo") 211 public String memo; 212 213 @SerializedName("return_time") 214 public String returnTime; 215 216 @SerializedName("return_reason") 217 public String returnReason; 218 219 @SerializedName("bank_name") 220 public String bankName; 221 222 @SerializedName("bank_card_tail") 223 public String bankCardTail; 224 225 @SerializedName("bank_account_name") 226 public String bankAccountName; 227 } 228 229 public static class QrRechargeInfo { 230 @SerializedName("openid") 231 public String openid; 232 233 @SerializedName("employee_type") 234 public EmployeeType employeeType; 235 236 @SerializedName("transaction_id") 237 public String transactionId; 238 } 239 240 public static class OnlineBankRechargeInfo { 241 @SerializedName("bill_no") 242 public String billNo; 243 244 @SerializedName("return_time") 245 public String returnTime; 246 247 @SerializedName("return_reason") 248 public String returnReason; 249 250 @SerializedName("bank_name") 251 public String bankName; 252 253 @SerializedName("online_bank_type") 254 public OnlineBankType onlineBankType; 255 256 @SerializedName("bank_card_tail") 257 public String bankCardTail; 258 259 @SerializedName("bank_account_name") 260 public String bankAccountName; 261 } 262 263 public enum EmployeeType { 264 @SerializedName("ADMIN") 265 ADMIN, 266 @SerializedName("STAFF") 267 STAFF, 268 @SerializedName("LEGAL_PERSON") 269 LEGAL_PERSON 270 } 271 272 public enum OnlineBankType { 273 @SerializedName("ONLINE_BANK_TYPE_CORPORATE") 274 ONLINE_BANK_TYPE_CORPORATE, 275 @SerializedName("ONLINE_BANK_TYPE_PERSONAL") 276 ONLINE_BANK_TYPE_PERSONAL 277 } 278 279} 280
需配合微信支付工具库 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 := &PlatSolutionGetByOutNoRequest{ 28 SubMchid: wxpay_utility.String("1900102208"), 29 OutRechargeNo: wxpay_utility.String("cz202407181234"), 30 } 31 32 response, err := PlatSolutionGetByOutNo(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 PlatSolutionGetByOutNo(config *wxpay_utility.MchConfig, request *PlatSolutionGetByOutNoRequest) (response *MchDeposit, err error) { 44 const ( 45 host = "https://api.mch.weixin.qq.com" 46 method = "GET" 47 path = "/v3/platsolution/ecommerce/recharges/out-recharge-no/{out_recharge_no}" 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 authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), nil) 67 if err != nil { 68 return nil, err 69 } 70 httpRequest.Header.Set("Authorization", authorization) 71 72 client := &http.Client{} 73 httpResponse, err := client.Do(httpRequest) 74 if err != nil { 75 return nil, err 76 } 77 respBody, err := wxpay_utility.ExtractResponseBody(httpResponse) 78 if err != nil { 79 return nil, err 80 } 81 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 { 82 // 2XX 成功,验证应答签名 83 err = wxpay_utility.ValidateResponse( 84 config.WechatPayPublicKeyId(), 85 config.WechatPayPublicKey(), 86 &httpResponse.Header, 87 respBody, 88 ) 89 if err != nil { 90 return nil, err 91 } 92 response := &MchDeposit{} 93 if err := json.Unmarshal(respBody, response); err != nil { 94 return nil, err 95 } 96 97 return response, nil 98 } else { 99 return nil, wxpay_utility.NewApiException( 100 httpResponse.StatusCode, 101 httpResponse.Header, 102 respBody, 103 ) 104 } 105} 106 107type PlatSolutionGetByOutNoRequest struct { 108 SubMchid *string `json:"sub_mchid,omitempty"` 109 OutRechargeNo *string `json:"out_recharge_no,omitempty"` 110} 111 112func (o *PlatSolutionGetByOutNoRequest) MarshalJSON() ([]byte, error) { 113 type Alias PlatSolutionGetByOutNoRequest 114 a := &struct { 115 SubMchid *string `json:"sub_mchid,omitempty"` 116 OutRechargeNo *string `json:"out_recharge_no,omitempty"` 117 *Alias 118 }{ 119 // 序列化时移除非 Body 字段 120 SubMchid: nil, 121 OutRechargeNo: nil, 122 Alias: (*Alias)(o), 123 } 124 return json.Marshal(a) 125} 126 127type MchDeposit struct { 128 SpMchid *string `json:"sp_mchid,omitempty"` 129 SubMchid *string `json:"sub_mchid,omitempty"` 130 RechargeId *string `json:"recharge_id,omitempty"` 131 OutRechargeNo *string `json:"out_recharge_no,omitempty"` 132 RechargeChannel *RechargeChannel `json:"recharge_channel,omitempty"` 133 AccountType *AccountType `json:"account_type,omitempty"` 134 RechargeState *RechargeState `json:"recharge_state,omitempty"` 135 RechargeScene *RechargeScene `json:"recharge_scene,omitempty"` 136 RechargeStateDesc *string `json:"recharge_state_desc,omitempty"` 137 RechargeAmount *RechargeAmount `json:"recharge_amount,omitempty"` 138 BankTransferInfo *BankTransferInfo `json:"bank_transfer_info,omitempty"` 139 QrRechargeInfo *QrRechargeInfo `json:"qr_recharge_info,omitempty"` 140 OnlineBankRechargeInfo *OnlineBankRechargeInfo `json:"online_bank_recharge_info,omitempty"` 141 AcceptTime *time.Time `json:"accept_time,omitempty"` 142 SuccessTime *time.Time `json:"success_time,omitempty"` 143 CloseTime *time.Time `json:"close_time,omitempty"` 144 AvailableRechargeChannels []RechargeChannel `json:"available_recharge_channels,omitempty"` 145} 146 147type RechargeChannel string 148 149func (e RechargeChannel) Ptr() *RechargeChannel { 150 return &e 151} 152 153const ( 154 RECHARGECHANNEL_BANK_TRANSFER RechargeChannel = "BANK_TRANSFER" 155 RECHARGECHANNEL_QR_RECHARGE RechargeChannel = "QR_RECHARGE" 156 RECHARGECHANNEL_ONLINE_BANK RechargeChannel = "ONLINE_BANK" 157) 158 159type AccountType string 160 161func (e AccountType) Ptr() *AccountType { 162 return &e 163} 164 165const ( 166 ACCOUNTTYPE_DEPOSIT AccountType = "DEPOSIT" 167 ACCOUNTTYPE_OPERATION AccountType = "OPERATION" 168) 169 170type RechargeState string 171 172func (e RechargeState) Ptr() *RechargeState { 173 return &e 174} 175 176const ( 177 RECHARGESTATE_SUCCESS RechargeState = "SUCCESS" 178 RECHARGESTATE_RECHARGING RechargeState = "RECHARGING" 179 RECHARGESTATE_CLOSED RechargeState = "CLOSED" 180) 181 182type RechargeScene string 183 184func (e RechargeScene) Ptr() *RechargeScene { 185 return &e 186} 187 188const ( 189 RECHARGESCENE_ECOMMERCE_DEPOSIT RechargeScene = "ECOMMERCE_DEPOSIT" 190 RECHARGESCENE_ECOMMERCE_PAYMENT RechargeScene = "ECOMMERCE_PAYMENT" 191) 192 193type RechargeAmount struct { 194 Amount *int64 `json:"amount,omitempty"` 195 Currency *string `json:"currency,omitempty"` 196} 197 198type BankTransferInfo struct { 199 BillNo *string `json:"bill_no,omitempty"` 200 Memo *string `json:"memo,omitempty"` 201 ReturnTime *time.Time `json:"return_time,omitempty"` 202 ReturnReason *string `json:"return_reason,omitempty"` 203 BankName *string `json:"bank_name,omitempty"` 204 BankCardTail *string `json:"bank_card_tail,omitempty"` 205 BankAccountName *string `json:"bank_account_name,omitempty"` 206} 207 208type QrRechargeInfo struct { 209 Openid *string `json:"openid,omitempty"` 210 EmployeeType *EmployeeType `json:"employee_type,omitempty"` 211 TransactionId *string `json:"transaction_id,omitempty"` 212} 213 214type OnlineBankRechargeInfo struct { 215 BillNo *string `json:"bill_no,omitempty"` 216 ReturnTime *time.Time `json:"return_time,omitempty"` 217 ReturnReason *string `json:"return_reason,omitempty"` 218 BankName *string `json:"bank_name,omitempty"` 219 OnlineBankType *OnlineBankType `json:"online_bank_type,omitempty"` 220 BankCardTail *string `json:"bank_card_tail,omitempty"` 221 BankAccountName *string `json:"bank_account_name,omitempty"` 222} 223 224type EmployeeType string 225 226func (e EmployeeType) Ptr() *EmployeeType { 227 return &e 228} 229 230const ( 231 EMPLOYEETYPE_ADMIN EmployeeType = "ADMIN" 232 EMPLOYEETYPE_STAFF EmployeeType = "STAFF" 233 EMPLOYEETYPE_LEGAL_PERSON EmployeeType = "LEGAL_PERSON" 234) 235 236type OnlineBankType string 237 238func (e OnlineBankType) Ptr() *OnlineBankType { 239 return &e 240} 241 242const ( 243 ONLINEBANKTYPE_ONLINE_BANK_TYPE_CORPORATE OnlineBankType = "ONLINE_BANK_TYPE_CORPORATE" 244 ONLINEBANKTYPE_ONLINE_BANK_TYPE_PERSONAL OnlineBankType = "ONLINE_BANK_TYPE_PERSONAL" 245) 246
应答参数
折叠全部参数
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" : "100000202405180012345678", 5 "out_recharge_no" : "cz202407181234", 6 "recharge_channel" : "QR_RECHARGE", 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 "qr_recharge_info" : { 16 "employee_type" : "STAFF", 17 "openid" : "owYiu0WOJdGCYxoHrPabGhI39uT4", 18 "transaction_id" : "4215463511252015071056489715" 19 }, 20 "accept_time" : "2015-05-19T13:29:35+08:00", 21 "success_time" : "2015-05-20T14:29:35+08:00", 22 "close_time" : "2015-05-20T13:29:35+08:00", 23 "available_recharge_channels" : [ 24 "QR_RECHARGE" 25 ] 26} 27
充值成功(银行转账)
1{ 2 "sp_mchid" : "1900001109", 3 "sub_mchid" : "1900001121", 4 "recharge_id" : "100000202405180012345678", 5 "out_recharge_no" : "cz202407181234", 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" : "111111", 17 "memo" : "转账充值附言", 18 "bank_name" : "中国银行", 19 "bank_card_tail" : "0722", 20 "bank_account_name" : "某某某有限公司" 21 }, 22 "accept_time" : "2015-05-19T13:29:35+08:00", 23 "success_time" : "2015-05-20T14:29:35+08:00", 24 "close_time" : "2015-05-20T13:29:35+08:00", 25 "available_recharge_channels" : [ 26 "BANK_TRANSFER" 27 ] 28} 29
充值成功(网银)
1{ 2 "sp_mchid" : "2480304861", 3 "sub_mchid" : "2600021157", 4 "recharge_id" : "100000202405180012345678", 5 "out_recharge_no" : "cz202407181234", 6 "recharge_channel" : "ONLINE_BANK", 7 "account_type" : "DEPOSIT", 8 "recharge_state" : "SUCCESS", 9 "recharge_scene" : "ECOMMERCE_DEPOSIT", 10 "recharge_state_desc" : "充值成功", 11 "recharge_amount" : { 12 "amount" : 10, 13 "currency" : "CNY" 14 }, 15 "online_bank_recharge_info" : { 16 "bill_no" : "162412031618542392059", 17 "bank_name" : "工商银行", 18 "online_bank_type" : "ONLINE_BANK_TYPE_CORPORATE", 19 "bank_card_tail" : "9999", 20 "bank_account_name" : "超级玛丽399" 21 }, 22 "accept_time" : "2024-12-03T15:06:00+08:00", 23 "success_time" : "2024-12-03T15:10:21+08:00", 24 "close_time" : "2015-05-20T13:29:35+08:00", 25 "available_recharge_channels" : [ 26 "ONLINE_BANK" 27 ] 28} 29
错误码
以下是本接口返回的错误码列表。详细错误码规则,请参考微信支付接口规则-错误码和错误提示
