查询二级商户充值结果
更新时间: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)
【二级商户号】 二级商户号
请求示例
需配合微信支付工具库 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 46 // TODO: 请求成功,继续业务逻辑 47 System.out.println(response); 48 } catch (WXPayUtility.ApiException e) { 49 // TODO: 请求失败,根据状态码执行不同的逻辑 50 e.printStackTrace(); 51 } 52 } 53 54 public MchDeposit run(PlatSolutionGetByOutNoRequest request) { 55 String uri = PATH; 56 uri = uri.replace("{out_recharge_no}", WXPayUtility.urlEncode(request.outRechargeNo)); 57 Map<String, Object> args = new HashMap<>(); 58 args.put("sub_mchid", request.subMchid); 59 uri = uri + "?" + WXPayUtility.urlEncode(args); 60 61 Request.Builder reqBuilder = new Request.Builder().url(HOST + uri); 62 reqBuilder.addHeader("Accept", "application/json"); 63 reqBuilder.addHeader("Wechatpay-Serial", wechatPayPublicKeyId); 64 reqBuilder.addHeader("Authorization", WXPayUtility.buildAuthorization(mchid, certificateSerialNo, privateKey, METHOD, uri, null)); 65 reqBuilder.method(METHOD, null); 66 Request httpRequest = reqBuilder.build(); 67 68 // 发送HTTP请求 69 OkHttpClient client = new OkHttpClient.Builder().build(); 70 try (Response httpResponse = client.newCall(httpRequest).execute()) { 71 String respBody = WXPayUtility.extractBody(httpResponse); 72 if (httpResponse.code() >= 200 && httpResponse.code() < 300) { 73 // 2XX 成功,验证应答签名 74 WXPayUtility.validateResponse(this.wechatPayPublicKeyId, this.wechatPayPublicKey, 75 httpResponse.headers(), respBody); 76 77 // 从HTTP应答报文构建返回数据 78 return WXPayUtility.fromJson(respBody, MchDeposit.class); 79 } else { 80 throw new WXPayUtility.ApiException(httpResponse.code(), respBody, httpResponse.headers()); 81 } 82 } catch (IOException e) { 83 throw new UncheckedIOException("Sending request to " + uri + " failed.", e); 84 } 85 } 86 87 private final String mchid; 88 private final String certificateSerialNo; 89 private final PrivateKey privateKey; 90 private final String wechatPayPublicKeyId; 91 private final PublicKey wechatPayPublicKey; 92 93 public PlatSolutionGetByOutNo(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) { 94 this.mchid = mchid; 95 this.certificateSerialNo = certificateSerialNo; 96 this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath); 97 this.wechatPayPublicKeyId = wechatPayPublicKeyId; 98 this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath); 99 } 100 101 public static class PlatSolutionGetByOutNoRequest { 102 @SerializedName("sub_mchid") 103 @Expose(serialize = false) 104 public String subMchid; 105 106 @SerializedName("out_recharge_no") 107 @Expose(serialize = false) 108 public String outRechargeNo; 109 } 110 111 public static class MchDeposit { 112 @SerializedName("sp_mchid") 113 public String spMchid; 114 115 @SerializedName("sub_mchid") 116 public String subMchid; 117 118 @SerializedName("recharge_id") 119 public String rechargeId; 120 121 @SerializedName("out_recharge_no") 122 public String outRechargeNo; 123 124 @SerializedName("recharge_channel") 125 public RechargeChannel rechargeChannel; 126 127 @SerializedName("account_type") 128 public AccountType accountType; 129 130 @SerializedName("recharge_state") 131 public RechargeState rechargeState; 132 133 @SerializedName("recharge_scene") 134 public RechargeScene rechargeScene; 135 136 @SerializedName("recharge_state_desc") 137 public String rechargeStateDesc; 138 139 @SerializedName("recharge_amount") 140 public RechargeAmount rechargeAmount; 141 142 @SerializedName("bank_transfer_info") 143 public BankTransferInfo bankTransferInfo; 144 145 @SerializedName("qr_recharge_info") 146 public QrRechargeInfo qrRechargeInfo; 147 148 @SerializedName("online_bank_recharge_info") 149 public OnlineBankRechargeInfo onlineBankRechargeInfo; 150 151 @SerializedName("accept_time") 152 public String acceptTime; 153 154 @SerializedName("success_time") 155 public String successTime; 156 157 @SerializedName("close_time") 158 public String closeTime; 159 160 @SerializedName("available_recharge_channels") 161 public List<RechargeChannel> availableRechargeChannels; 162 } 163 164 public enum RechargeChannel { 165 @SerializedName("BANK_TRANSFER") 166 BANK_TRANSFER, 167 @SerializedName("QR_RECHARGE") 168 QR_RECHARGE, 169 @SerializedName("ONLINE_BANK") 170 ONLINE_BANK 171 } 172 173 public enum AccountType { 174 @SerializedName("DEPOSIT") 175 DEPOSIT, 176 @SerializedName("OPERATION") 177 OPERATION 178 } 179 180 public enum RechargeState { 181 @SerializedName("SUCCESS") 182 SUCCESS, 183 @SerializedName("RECHARGING") 184 RECHARGING, 185 @SerializedName("CLOSED") 186 CLOSED 187 } 188 189 public enum RechargeScene { 190 @SerializedName("ECOMMERCE_DEPOSIT") 191 ECOMMERCE_DEPOSIT, 192 @SerializedName("ECOMMERCE_PAYMENT") 193 ECOMMERCE_PAYMENT 194 } 195 196 public static class RechargeAmount { 197 @SerializedName("amount") 198 public Long amount; 199 200 @SerializedName("currency") 201 public String currency; 202 } 203 204 public static class BankTransferInfo { 205 @SerializedName("bill_no") 206 public String billNo; 207 208 @SerializedName("memo") 209 public String memo; 210 211 @SerializedName("return_time") 212 public String returnTime; 213 214 @SerializedName("return_reason") 215 public String returnReason; 216 217 @SerializedName("bank_name") 218 public String bankName; 219 220 @SerializedName("bank_card_tail") 221 public String bankCardTail; 222 223 @SerializedName("bank_account_name") 224 public String bankAccountName; 225 } 226 227 public static class QrRechargeInfo { 228 @SerializedName("openid") 229 public String openid; 230 231 @SerializedName("employee_type") 232 public EmployeeType employeeType; 233 } 234 235 public static class OnlineBankRechargeInfo { 236 @SerializedName("bill_no") 237 public String billNo; 238 239 @SerializedName("return_time") 240 public String returnTime; 241 242 @SerializedName("return_reason") 243 public String returnReason; 244 245 @SerializedName("bank_name") 246 public String bankName; 247 248 @SerializedName("online_bank_type") 249 public OnlineBankType onlineBankType; 250 251 @SerializedName("bank_card_tail") 252 public String bankCardTail; 253 254 @SerializedName("bank_account_name") 255 public String bankAccountName; 256 } 257 258 public enum EmployeeType { 259 @SerializedName("ADMIN") 260 ADMIN, 261 @SerializedName("STAFF") 262 STAFF, 263 @SerializedName("LEGAL_PERSON") 264 LEGAL_PERSON 265 } 266 267 public enum OnlineBankType { 268 @SerializedName("ONLINE_BANK_TYPE_CORPORATE") 269 ONLINE_BANK_TYPE_CORPORATE, 270 @SerializedName("ONLINE_BANK_TYPE_PERSONAL") 271 ONLINE_BANK_TYPE_PERSONAL 272 } 273 274} 275
需配合微信支付工具库 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 query.Add("sub_mchid", *request.SubMchid) 57 reqUrl.RawQuery = query.Encode() 58 httpRequest, err := http.NewRequest(method, reqUrl.String(), nil) 59 if err != nil { 60 return nil, err 61 } 62 httpRequest.Header.Set("Accept", "application/json") 63 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId()) 64 authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), nil) 65 if err != nil { 66 return nil, err 67 } 68 httpRequest.Header.Set("Authorization", authorization) 69 70 client := &http.Client{} 71 httpResponse, err := client.Do(httpRequest) 72 if err != nil { 73 return nil, err 74 } 75 76 respBody, err := wxpay_utility.ExtractResponseBody(httpResponse) 77 if err != nil { 78 return nil, err 79 } 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 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} 212 213type OnlineBankRechargeInfo struct { 214 BillNo *string `json:"bill_no,omitempty"` 215 ReturnTime *time.Time `json:"return_time,omitempty"` 216 ReturnReason *string `json:"return_reason,omitempty"` 217 BankName *string `json:"bank_name,omitempty"` 218 OnlineBankType *OnlineBankType `json:"online_bank_type,omitempty"` 219 BankCardTail *string `json:"bank_card_tail,omitempty"` 220 BankAccountName *string `json:"bank_account_name,omitempty"` 221} 222 223type EmployeeType string 224 225func (e EmployeeType) Ptr() *EmployeeType { 226 return &e 227} 228 229const ( 230 EMPLOYEETYPE_ADMIN EmployeeType = "ADMIN" 231 EMPLOYEETYPE_STAFF EmployeeType = "STAFF" 232 EMPLOYEETYPE_LEGAL_PERSON EmployeeType = "LEGAL_PERSON" 233) 234 235type OnlineBankType string 236 237func (e OnlineBankType) Ptr() *OnlineBankType { 238 return &e 239} 240 241const ( 242 ONLINEBANKTYPE_ONLINE_BANK_TYPE_CORPORATE OnlineBankType = "ONLINE_BANK_TYPE_CORPORATE" 243 ONLINEBANKTYPE_ONLINE_BANK_TYPE_PERSONAL OnlineBankType = "ONLINE_BANK_TYPE_PERSONAL" 244) 245
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
充值成功(银行转账)
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
充值成功(网银)
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
应答参数
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 【员工类型】 员工类型 可选取值
|
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 }, 19 "accept_time" : "2015-05-19T13:29:35+08:00", 20 "success_time" : "2015-05-20T14:29:35+08:00", 21 "close_time" : "2015-05-20T13:29:35+08:00", 22 "available_recharge_channels" : [ 23 "QR_RECHARGE" 24 ] 25} 26
充值成功(银行转账)
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
错误码
公共错误码
状态码 | 错误码 | 描述 | 解决方案 |
---|---|---|---|
400 | PARAM_ERROR | 参数错误 | 请根据错误提示正确传入参数 |
400 | INVALID_REQUEST | HTTP 请求不符合微信支付 APIv3 接口规则 | 请参阅 接口规则 |
401 | SIGN_ERROR | 验证不通过 | 请参阅 签名常见问题 |
500 | SYSTEM_ERROR | 系统异常,请稍后重试 | 请稍后重试 |
业务错误码
状态码 | 错误码 | 描述 | 解决方案 |
---|---|---|---|
404 | NOT_FOUND | 充值单不存在 | 请检查业务充值单号 |
403 | NO_AUTH | 服务商未开通平台收付通 | 服务商开通微信支付平台收付通 |
429 | FREQUENCY_LIMITED | 频率超限 | 请降低请求频率 |