接口描述
项 | 值 |
url | https://pay.qcloud.com/cpay/query_order |
输入参数
参数名 | 必填 | 类型 | 说明 |
request_content | 是 | String | 请求内容,该 string 可以转为 json 结构,json 格式见本节 RequestContent。 |
authen_info | 是 | AuthenInfo | 认证信息,详见接口调用说明。 |
RequestContent 结构
一级参数名 | 二级参数名 | 必填 | 类型 | 说明 |
pay_platform | 否 | Number(32) | 第三方支付类型。 | |
| sub_pay_platform | 否 | Number(32) | 第三方支付子类型。 |
| out_mch_id | 是 | String(32) | 服务商对外账号。 |
| out_sub_mch_id | 是 | String(32) | 子商户对外账号。 |
| out_shop_id | 是 | String(32) | 门店对外账号。 |
order_client | device_id | 否 | String(64) | 子商户自定义,终端设备号。 |
| staff_id | 否 | String(64) | 子商户自定义,店员 ID。 |
| terminal_type | 是 | Number(32) | 终端类型,1:Windows,2:Andriod,3:iOS,4:Linux,100:其他。 |
| sdk_version | 是 | String(10) | 云支付 SDK 版本号。 |
| spbill_create_ip | 是 | String(16) | 调用云支付 API 的机器 IP。 |
| sn_code | 否 | String(127) | 设备 sn 号。 |
out_trade_no | - | 是 | String(32) | 订单号。 |
trade_type | - | 否 | Number(32) | 支付方式,详见枚举 TradeType。 |
nonce_str | - | 是 | String(32) | 随机字符串。 |
输出参数
参数名 | 必填 | 类型 | 说明 |
response_content | 是 | ResponseContent | 请求内容,详见本节 ResponseContent。 |
authen_info | 否 | AuthenInfo | 认证信息,详见接口调用说明。 |
ResponseContent 结构
参数名 | 必填 | 类型 | 说明 |
status | 是 | Status | 错误码,详见枚举值 Status。此字段仅表示接口调用成功状态,订单状态请以 current_trade_state 字段为准。 |
description | 否 | String(255) | 错误描述。 |
log_id | 是 | Number(32) | 消息 ID。 |
internal_status | 是 | Number(32) | 调试使用,调用者可以不予理会。 |
query_order | 否 | QueryOrderResponse | authen_info 存在时必填。详见 QueryOrderResponse。 |
QueryOrderResponse 结构
参数名 | 必填 | 类型 | 说明 |
order_content | 是 | OrderContent | 订单信息,详见公共数据结构 OrderContent。 |
pay_mch_key | 是 | PayMchKey | 支付商户信息,详见公共数据结构 PayMchKey。 |
order_client | 否 | OrderClient | 详见公共数据结构 OrderClient。 |
nonce_str | 是 | String(32) | 随机字符串。 |
示例
输入参数示例:
{"authen_info": {"a": {"authen_type": 1,"authen_code": "664A939ECD36280AE1E6D39029011216CEF4A1DDE1640098F6FED7E88CFD707D"}},"request_content": "{"pay_mch_key": {"pay_platform": 1,"sub_pay_platform": 100,"out_shop_id": "sz011biKxOguirmBqiFR","out_sub_mch_id": "sz01KzuCUOmw8yjtPite","out_mch_id": "sz01lXKA6DKGjNzr2l4B"},"trade_type": 1,"out_trade_no": "sz010002cz11566803216","nonce_str": "E94C00688C3F429CA2B0B396BF823548","order_client": {"staff_id": "1192","machine_no": "1111","terminal_type": 1,"sdk_version": "1.0","device_id": "12345","spbill_create_ip": "90.0.00.0"}}"}
输出参数示例:
{"response_content": "{"status": 0,"description": "\\u64CD\\u4F5C\\u6210\\u529F\\u3002","log_id": 2817472575,"internal_status": 0,"query_order": {"pay_mch_key": {"pay_platform": 1,"out_mch_id": "sz01lXKA6DKGjNzr2l4B","out_sub_mch_id": "sz01KzuCUOmw8yjtPite","out_shop_id": "sz011biKxOguirmBqiFR","sub_pay_platform": 100,"wxpay_pay_mch_key_ext": {"app_id": "wx998fa95558590e1c","sub_app_id": "","open_id": "ovJrDwsjamQql-k7Zr1Q-EaKFQ0k","sub_open_id": ""}},"order_content": {"out_trade_no": "sz010002cz11566803216","transaction_id": "4200000400201908267240992395","trade_type": 1,"author_code": "134520273825387649","time_expire": 1566803336,"time_end": 1566803217,"nonce_str": "E94C00688C3F429CA2B0B396BF823548","create_time": 1566803216,"last_update_time": 1566803218,"is_transforming": false,"source_type": 0,"caller_notify_url": "","total_fee": 1,"fee_type": "CNY","cash_fee": 1,"cash_fee_type": "CNY","settlement_total_fee": 1,"body": "body","detail": "","context": "","exchange_rate": 100000000,"client_flow_id": "","remark": "","trade_state": 4,"wxpay_order_content_ext": {"current_trade_state": 2,"attach": "","bank_type": "CFT","goods_tag": "X293123","coupon_fee": 0,"coupon_count": 0,"product_id": "","limit_pay": "","prepare_id": "","trade_state_desc": ""}},"nonce_str": "TqSHJKFpAlCOr3nfKWf4QTKwmiboi0Sn","order_client": {"device_id": "824","staff_id": "1206","machine_no": "1111","terminal_type": 1,"sdk_version": "1.0","spbill_create_ip": "90.0.00.0","sub_terminal_type": 0}}}","authen_info": {"a": {"authen_type": 1,"authen_code": "428C7A16E605C21CF1A939882D7A195D26E041A3CAEFF004F11B0B1CC7EE8727"}}}