查询订单
更新时间:2025.02.21商户通过商户订单号,来查询订单信息
接口说明
支持商户:【普通商户】
请求方式:【GET】/v3/vehicle/transactions/out-trade-no/{out_trade_no}
请求域名:【主域名】https://api.mch.weixin.qq.com 使用该域名将访问就近的接入点
【备域名】https://api2.mch.weixin.qq.com 使用该域名将访问异地的接入点 ,指引点击查看
请求参数
Header HTTP头参数
Authorization 必填 string
请参考签名认证生成认证信息
Accept 必填 string
请设置为application/json
path 路径参数
out_trade_no 必填 string(32)
【商户订单号】商户系统内部订单号,只能是数字、大小写字母,且在同一个商户号下唯一
请求示例
GET
1curl -X GET \ 2 https://api.mch.weixin.qq.com/v3/vehicle/transactions/out-trade-no/20150806125346 \ 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 QueryTransaction { 26 private static String HOST = "https://api.mch.weixin.qq.com"; 27 private static String METHOD = "GET"; 28 private static String PATH = "/v3/vehicle/transactions/out-trade-no/{out_trade_no}"; 29 30 public static void main(String[] args) { 31 // TODO: 请准备商户开发必要参数,参考:https://pay.weixin.qq.com/doc/v3/merchant/4013070756 32 QueryTransaction client = new QueryTransaction( 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 QueryTransactionRequest request = new QueryTransactionRequest(); 41 request.outTradeNo = "20150806125346"; 42 try { 43 Transaction response = client.run(request); 44 // TODO: 请求成功,继续业务逻辑 45 System.out.println(response); 46 } catch (WXPayUtility.ApiException e) { 47 // TODO: 请求失败,根据状态码执行不同的逻辑 48 e.printStackTrace(); 49 } 50 } 51 52 public Transaction run(QueryTransactionRequest request) { 53 String uri = PATH; 54 uri = uri.replace("{out_trade_no}", WXPayUtility.urlEncode(request.outTradeNo)); 55 56 Request.Builder reqBuilder = new Request.Builder().url(HOST + uri); 57 reqBuilder.addHeader("Accept", "application/json"); 58 reqBuilder.addHeader("Wechatpay-Serial", wechatPayPublicKeyId); 59 reqBuilder.addHeader("Authorization", WXPayUtility.buildAuthorization(mchid, certificateSerialNo, privateKey, METHOD, uri, null)); 60 reqBuilder.method(METHOD, null); 61 Request httpRequest = reqBuilder.build(); 62 63 // 发送HTTP请求 64 OkHttpClient client = new OkHttpClient.Builder().build(); 65 try (Response httpResponse = client.newCall(httpRequest).execute()) { 66 String respBody = WXPayUtility.extractBody(httpResponse); 67 if (httpResponse.code() >= 200 && httpResponse.code() < 300) { 68 // 2XX 成功,验证应答签名 69 WXPayUtility.validateResponse(this.wechatPayPublicKeyId, this.wechatPayPublicKey, 70 httpResponse.headers(), respBody); 71 72 // 从HTTP应答报文构建返回数据 73 return WXPayUtility.fromJson(respBody, Transaction.class); 74 } else { 75 throw new WXPayUtility.ApiException(httpResponse.code(), respBody, httpResponse.headers()); 76 } 77 } catch (IOException e) { 78 throw new UncheckedIOException("Sending request to " + uri + " failed.", e); 79 } 80 } 81 82 private final String mchid; 83 private final String certificateSerialNo; 84 private final PrivateKey privateKey; 85 private final String wechatPayPublicKeyId; 86 private final PublicKey wechatPayPublicKey; 87 88 public QueryTransaction(String mchid, String certificateSerialNo, String privateKeyFilePath, String wechatPayPublicKeyId, String wechatPayPublicKeyFilePath) { 89 this.mchid = mchid; 90 this.certificateSerialNo = certificateSerialNo; 91 this.privateKey = WXPayUtility.loadPrivateKeyFromPath(privateKeyFilePath); 92 this.wechatPayPublicKeyId = wechatPayPublicKeyId; 93 this.wechatPayPublicKey = WXPayUtility.loadPublicKeyFromPath(wechatPayPublicKeyFilePath); 94 } 95 96 public static class QueryTransactionRequest { 97 @SerializedName("out_trade_no") 98 @Expose(serialize = false) 99 public String outTradeNo; 100 } 101 102 public static class Transaction { 103 @SerializedName("appid") 104 public String appid; 105 106 @SerializedName("sp_mchid") 107 public String spMchid; 108 109 @SerializedName("description") 110 public String description; 111 112 @SerializedName("create_time") 113 public String createTime; 114 115 @SerializedName("out_trade_no") 116 public String outTradeNo; 117 118 @SerializedName("transaction_id") 119 public String transactionId; 120 121 @SerializedName("trade_state") 122 public String tradeState; 123 124 @SerializedName("trade_state_description") 125 public String tradeStateDescription; 126 127 @SerializedName("success_time") 128 public String successTime; 129 130 @SerializedName("bank_type") 131 public String bankType; 132 133 @SerializedName("user_repaid") 134 public String userRepaid; 135 136 @SerializedName("attach") 137 public String attach; 138 139 @SerializedName("trade_scene") 140 public String tradeScene; 141 142 @SerializedName("parking_info") 143 public ParkingTradeScene parkingInfo; 144 145 @SerializedName("payer") 146 public Payer payer; 147 148 @SerializedName("amount") 149 public QueryOrderAmount amount; 150 151 @SerializedName("promotion_detail") 152 public List<PromotionDetail> promotionDetail; 153 } 154 155 public static class ParkingTradeScene { 156 @SerializedName("parking_id") 157 public String parkingId; 158 159 @SerializedName("plate_number") 160 public String plateNumber; 161 162 @SerializedName("plate_color") 163 public PlateColor plateColor; 164 165 @SerializedName("start_time") 166 public String startTime; 167 168 @SerializedName("end_time") 169 public String endTime; 170 171 @SerializedName("parking_name") 172 public String parkingName; 173 174 @SerializedName("charging_duration") 175 public Long chargingDuration; 176 177 @SerializedName("device_id") 178 public String deviceId; 179 } 180 181 public static class Payer { 182 @SerializedName("openid") 183 public String openid; 184 } 185 186 public static class QueryOrderAmount { 187 @SerializedName("total") 188 public Long total; 189 190 @SerializedName("currency") 191 public String currency; 192 193 @SerializedName("payer_total") 194 public Long payerTotal; 195 196 @SerializedName("discount_total") 197 public Long discountTotal; 198 } 199 200 public static class PromotionDetail { 201 @SerializedName("coupon_id") 202 public String couponId; 203 204 @SerializedName("name") 205 public String name; 206 207 @SerializedName("scope") 208 public String scope; 209 210 @SerializedName("type") 211 public String type; 212 213 @SerializedName("stock_id") 214 public String stockId; 215 216 @SerializedName("amount") 217 public Long amount; 218 219 @SerializedName("wechatpay_contribute") 220 public Long wechatpayContribute; 221 222 @SerializedName("merchant_contribute") 223 public Long merchantContribute; 224 225 @SerializedName("other_contribute") 226 public Long otherContribute; 227 228 @SerializedName("currency") 229 public String currency; 230 } 231 232 public enum PlateColor { 233 @SerializedName("BLUE") 234 BLUE, 235 @SerializedName("GREEN") 236 GREEN, 237 @SerializedName("YELLOW") 238 YELLOW, 239 @SerializedName("BLACK") 240 BLACK, 241 @SerializedName("WHITE") 242 WHITE, 243 @SerializedName("LIMEGREEN") 244 LIMEGREEN 245 } 246 247} 248
需配合微信支付工具库 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 := &QueryTransactionRequest{ 28 OutTradeNo: wxpay_utility.String("20150806125346"), 29 } 30 31 response, err := QueryTransaction(config, request) 32 if err != nil { 33 fmt.Printf("请求失败: %+v\n", err) 34 // TODO: 请求失败,根据状态码执行不同的处理 35 return 36 } 37 38 // TODO: 请求成功,继续业务逻辑 39 fmt.Printf("请求成功: %+v\n", response) 40} 41 42func QueryTransaction(config *wxpay_utility.MchConfig, request *QueryTransactionRequest) (response *Transaction, err error) { 43 const ( 44 host = "https://api.mch.weixin.qq.com" 45 method = "GET" 46 path = "/v3/vehicle/transactions/out-trade-no/{out_trade_no}" 47 ) 48 49 reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path)) 50 if err != nil { 51 return nil, err 52 } 53 reqUrl.Path = strings.Replace(reqUrl.Path, "{out_trade_no}", url.PathEscape(*request.OutTradeNo), -1) 54 httpRequest, err := http.NewRequest(method, reqUrl.String(), nil) 55 if err != nil { 56 return nil, err 57 } 58 httpRequest.Header.Set("Accept", "application/json") 59 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId()) 60 authorization, err := wxpay_utility.BuildAuthorization(config.MchId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), nil) 61 if err != nil { 62 return nil, err 63 } 64 httpRequest.Header.Set("Authorization", authorization) 65 66 client := &http.Client{} 67 httpResponse, err := client.Do(httpRequest) 68 if err != nil { 69 return nil, err 70 } 71 respBody, err := wxpay_utility.ExtractResponseBody(httpResponse) 72 if err != nil { 73 return nil, err 74 } 75 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 { 76 // 2XX 成功,验证应答签名 77 err = wxpay_utility.ValidateResponse( 78 config.WechatPayPublicKeyId(), 79 config.WechatPayPublicKey(), 80 &httpResponse.Header, 81 respBody, 82 ) 83 if err != nil { 84 return nil, err 85 } 86 response := &Transaction{} 87 if err := json.Unmarshal(respBody, response); err != nil { 88 return nil, err 89 } 90 91 return response, nil 92 } else { 93 return nil, wxpay_utility.NewApiException( 94 httpResponse.StatusCode, 95 httpResponse.Header, 96 respBody, 97 ) 98 } 99} 100 101type QueryTransactionRequest struct { 102 OutTradeNo *string `json:"out_trade_no,omitempty"` 103} 104 105func (o *QueryTransactionRequest) MarshalJSON() ([]byte, error) { 106 type Alias QueryTransactionRequest 107 a := &struct { 108 OutTradeNo *string `json:"out_trade_no,omitempty"` 109 *Alias 110 }{ 111 // 序列化时移除非 Body 字段 112 OutTradeNo: nil, 113 Alias: (*Alias)(o), 114 } 115 return json.Marshal(a) 116} 117 118type Transaction struct { 119 Appid *string `json:"appid,omitempty"` 120 SpMchid *string `json:"sp_mchid,omitempty"` 121 Description *string `json:"description,omitempty"` 122 CreateTime *time.Time `json:"create_time,omitempty"` 123 OutTradeNo *string `json:"out_trade_no,omitempty"` 124 TransactionId *string `json:"transaction_id,omitempty"` 125 TradeState *string `json:"trade_state,omitempty"` 126 TradeStateDescription *string `json:"trade_state_description,omitempty"` 127 SuccessTime *time.Time `json:"success_time,omitempty"` 128 BankType *string `json:"bank_type,omitempty"` 129 UserRepaid *string `json:"user_repaid,omitempty"` 130 Attach *string `json:"attach,omitempty"` 131 TradeScene *string `json:"trade_scene,omitempty"` 132 ParkingInfo *ParkingTradeScene `json:"parking_info,omitempty"` 133 Payer *Payer `json:"payer,omitempty"` 134 Amount *QueryOrderAmount `json:"amount,omitempty"` 135 PromotionDetail []PromotionDetail `json:"promotion_detail,omitempty"` 136} 137 138type ParkingTradeScene struct { 139 ParkingId *string `json:"parking_id,omitempty"` 140 PlateNumber *string `json:"plate_number,omitempty"` 141 PlateColor *PlateColor `json:"plate_color,omitempty"` 142 StartTime *time.Time `json:"start_time,omitempty"` 143 EndTime *time.Time `json:"end_time,omitempty"` 144 ParkingName *string `json:"parking_name,omitempty"` 145 ChargingDuration *int64 `json:"charging_duration,omitempty"` 146 DeviceId *string `json:"device_id,omitempty"` 147} 148 149type Payer struct { 150 Openid *string `json:"openid,omitempty"` 151} 152 153type QueryOrderAmount struct { 154 Total *int64 `json:"total,omitempty"` 155 Currency *string `json:"currency,omitempty"` 156 PayerTotal *int64 `json:"payer_total,omitempty"` 157 DiscountTotal *int64 `json:"discount_total,omitempty"` 158} 159 160type PromotionDetail struct { 161 CouponId *string `json:"coupon_id,omitempty"` 162 Name *string `json:"name,omitempty"` 163 Scope *string `json:"scope,omitempty"` 164 Type *string `json:"type,omitempty"` 165 StockId *string `json:"stock_id,omitempty"` 166 Amount *int64 `json:"amount,omitempty"` 167 WechatpayContribute *int64 `json:"wechatpay_contribute,omitempty"` 168 MerchantContribute *int64 `json:"merchant_contribute,omitempty"` 169 OtherContribute *int64 `json:"other_contribute,omitempty"` 170 Currency *string `json:"currency,omitempty"` 171} 172 173type PlateColor string 174 175func (e PlateColor) Ptr() *PlateColor { 176 return &e 177} 178 179const ( 180 PLATECOLOR_BLUE PlateColor = "BLUE" 181 PLATECOLOR_GREEN PlateColor = "GREEN" 182 PLATECOLOR_YELLOW PlateColor = "YELLOW" 183 PLATECOLOR_BLACK PlateColor = "BLACK" 184 PLATECOLOR_WHITE PlateColor = "WHITE" 185 PLATECOLOR_LIMEGREEN PlateColor = "LIMEGREEN" 186) 187
应答参数
|
appid 必填 string(32)
【公众账号ID】AppID是商户在微信申请公众号或移动应用成功后分配的账号ID,登录平台为mp.weixin.qq.com或open.weixin.qq.com
sp_mchid 必填 string(32)
【商户号】微信支付分配的商户号
description 必填 string(128)
【服务描述】商户自定义字段,用于交易账单中对扣费服务的描述。
create_time 必填 string(32)
【订单创建时间】订单成功创建时返回,遵循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秒。
out_trade_no 必填 string(32)
【商户订单号】商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一
transaction_id 选填 string(32)
【微信支付订单号】微信支付订单号
trade_state 必填 string(32)
【交易状态】SUCCESS—支付成功
ACCEPTED—已接收,等待扣款
PAY_FAIL–支付失败(其他原因,如银行返回失败)
REFUND—转入退款
trade_state_description 选填 string(256)
【交易状态描述】对当前订单状态的描述和下一步操作的指引
success_time 选填 string(32)
【支付完成时间】订单支付完成时间,遵循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秒。
bank_type 选填 string(16)
【付款银行】银行类型,采用字符串类型的银行标识。BPA:该笔订单由微信进行垫付
user_repaid 选填 string(1)
【用户是否已还款】枚举值:
Y:用户已还款
N:用户未还款
注意:使用此字段前需先确认bank_type字段值为BPA以及 trade_state字段值为SUCCESS。
attach 选填 string(128)
【附加数据】附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用
trade_scene 必填 string(32)
【交易场景】交易场景值,目前支持 :PARKING:车场停车场景
parking_info 选填 object
【停车场景信息】返回信息中的trade_scene为PARKING,返回该场景信息
属性 | |
parking_id 必填 string(32) 【入场ID】微信支付分停车服务为商户分配的入场ID,商户通过入场通知接口获取入场ID plate_number 必填 string(32) 【车牌号】车牌号,仅包括省份+车牌,不包括特殊字符。 plate_color 必填 string 【车牌颜色】车牌颜色 可选取值:
start_time 必填 string(32) 【入场时间】用户入场时间,遵循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秒。 end_time 必填 string(32) 【出场时间】用户出场时间,遵循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秒。 parking_name 必填 string(32) 【停车场名称】所在停车位车场的名称 charging_duration 必填 integer 【计费时长】计费的时间长,单位为秒 device_id 必填 string(32) 【停车场设备ID】停车场设备ID |
payer 必填 object
【支付者信息】支付者信息
属性 | |
openid 必填 string(32) 【用户在AppID下的标识】用户在AppID下的唯一标识 |
amount 必填 object
【订单金额信息】订单金额信息
属性 | |
total 必填 integer 【订单金额】订单总金额,单位为分,只能为整数,详见支付金额 currency 选填 string(16) 【货币类型】符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY payer_total 选填 integer 【用户实际支付金额】用户实际支付金额,单位为分,只能为整数,详见支付金额 discount_total 选填 integer 【折扣】订单折扣 |
promotion_detail 选填 array[object]
【优惠信息】优惠信息
属性 | |
coupon_id 必填 string(32) 【券ID】券或者立减优惠ID name 选填 string(128) 【优惠名称】优惠名称 scope 选填 string(32) 【优惠范围】GLOBAL-全场代金券, type 选填 string(16) 【优惠类型】枚举值: stock_id 选填 string(32) 【活动ID】在微信商户后台配置的批次ID amount 必填 integer 【优惠券面额】用户享受优惠的金额 wechatpay_contribute 选填 integer 【微信出资】特指由微信支付商户平台创建的优惠,出资金额等于本项优惠总金额,单位为分 merchant_contribute 选填 integer 【商户出资】特指商户自己创建的优惠,出资金额等于本项优惠总金额,单位为分 other_contribute 选填 integer 【其他出资】其他出资方出资金额,单位为分 currency 选填 string(16) 【优惠币种】CNY:人民币,境内商户号仅支持人民币。 |
应答示例
200 OK
1{ 2 "appid" : "wxcbda96de0b165486", 3 "sp_mchid" : "1230000109", 4 "description" : "停车场扣费", 5 "create_time" : "2017-08-26T10:43:39+08:00", 6 "out_trade_no" : "20150806125346", 7 "transaction_id" : "1009660380201506130728806387", 8 "trade_state" : "SUCCESS", 9 "trade_state_description" : "支付失败,请重新下单支付", 10 "success_time" : "2017-08-26T10:43:39+08:00", 11 "bank_type" : "CMC", 12 "user_repaid" : "Y", 13 "attach" : "深圳分店", 14 "trade_scene" : "PARKING", 15 "parking_info" : { 16 "parking_id" : "5K8264ILTKCH16CQ250", 17 "plate_number" : "粤B888888", 18 "plate_color" : "BLUE", 19 "start_time" : "2017-08-26T10:43:39+08:00", 20 "end_time" : "2017-08-26T10:43:39+08:00", 21 "parking_name" : "欢乐海岸停车场", 22 "charging_duration" : 3600, 23 "device_id" : "12313" 24 }, 25 "payer" : { 26 "openid" : "oUpF8uMuAJOM2pxb1Q" 27 }, 28 "amount" : { 29 "total" : 888, 30 "currency" : "CNY", 31 "payer_total" : 100, 32 "discount_total" : 100 33 }, 34 "promotion_detail" : [ 35 { 36 "coupon_id" : "109519", 37 "name" : "单品惠-6", 38 "scope" : "SINGLE", 39 "type" : "CASH", 40 "stock_id" : "931386", 41 "amount" : 5, 42 "wechatpay_contribute" : 1, 43 "merchant_contribute" : 1, 44 "other_contribute" : 1, 45 "currency" : "CNY" 46 } 47 ] 48} 49
错误码
公共错误码
状态码 | 错误码 | 描述 | 解决方案 |
---|---|---|---|
400 | PARAM_ERROR | 参数错误 | 请根据错误提示正确传入参数 |
400 | INVALID_REQUEST | HTTP 请求不符合微信支付 APIv3 接口规则 | 请参阅 接口规则 |
401 | SIGN_ERROR | 验证不通过 | 请参阅 签名常见问题 |
500 | SYSTEM_ERROR | 系统异常,请稍后重试 | 请稍后重试 |
业务错误码
状态码 | 错误码 | 描述 | 解决方案 |
---|---|---|---|
400 | INVALID_REQUEST | 不支持查询非支付分停车订单,请更换单号后再试 | 商户查询的订单非支付分停车订单,该接口只支持查询通过支付分停车受理扣款接口下单的订单信息,请更换单号后再试 |
400 | INVALID_REQUEST | 服务商和子商户没有绑定关系 | 检查请求中的sub_mchid与服务商商户号是否匹配,然后重试 |
400 | PARAM_ERROR | 参数错误,请检查out_trade_no | 参数错误,请检查out_trade_no为创建订单时的商户订单号 |
404 | NOT_FOUND | 订单不存在 | 请确认out_trade_no正确且为当前商户的订单 |
429 | RATELIMIT_EXCEEDED | 达到调用速率限制 | 接口调用频率过快,请降低请求频率 |
500 | SYSTEM_ERROR | 出现内部服务器错误 | 5开头的错误码均为系统错误,请使用相同的参数稍后重试 |