订单查询接口

接口名称

openapi.payment.order.query

请求方式

POST

请求头

application/json; charset=utf-8

请求业务参数

参数 类型 是否必填 最大长度 描述
merchant_order_sn string 32 第三方订单号[二选一]
order_sn string 32 付呗订单号[二选一]
device_no string 18 设备终端号
  • 请求示例:
    {
    "app_id":"20160922135339595387",
    "method":"openapi.payment.order.query",
    "format":"json",
    "sign_method":"md5",
    "nonce":"87sdf9806sdf73jkds",
    "biz_content":"{\"merchant_order_sn\":\"20160120105532871512\"}",
    "sign":"C76CDCF08496A8CDC37C4C11FCB29976"
    }
    

成功响应参数

参数 类型 是否必填 最大长度 描述
merchant_order_sn string 32 第三方商户订单号
order_sn string 32 付呗订单号
trade_no string 32 商户单号
platform_order_no string 32 平台方订单号
trade_state string 20 交易状态, USERPAYING :待支付; SUCCESS:支付成功;REVOKED:已撤销;REVOKING:撤销中;REVOKED_ERROR:撤销失败;CLOSED:已关闭
total_fee float 10 实收金额(元)
order_price float 10 订单金额
fee float 10 手续费(元)
net_money float 10 净收金额(元) = 实收金额 - 手续费
pay_time int 10 支付时间,当支付成功时返回
store_id int 10 门店ID 0表示没有门店
cashier_id int 10 收银员ID 0表示没有收银员
device_no string 18 设备终端号
body string 128 对交易或商品的描述(微信上body值显示在商品,支付宝上body值显示在商品说明)
type int 1 1 微信支付 2 支付宝支付 5银联
discount_money string 10 商家折扣减的金额
buyer_pay_amount string 10 买家实际支付的金额
attach string 127 附加数据
user_id string 32 微信顾客支付授权的“open_id”或者支付宝顾客的“buyer_user_id”
user_logon_id string 32 支付宝顾客的账号
cash_coupon_fee float 10 预充值代金券金额
no_cash_coupon_fee float 10 免充值代金券金额
  • 响应示例:
{
  "result_message": "成功",
  "data": {
    "trade_no": "2017060121534801983049958160",
    "merchant_order_sn": "201706011496325244549",
    "platform_order_no": "12345678998765433223",
    "order_sn": "20170601215348178414",
    "total_fee": 80,
    "fee": 1,
    "net_money": 79,
    "pay_time": 1496325236,
    "store_id": "25249",
    "cashier_id": "0",
    "trade_state": "SUCCESS",
    "type":1,
    "discount_money":"20.00",
    "buyer_pay_amount":"80.00",
    "attach": "",
    "user_id": "",
    "user_logon_id": "",
    "no_cash_coupon_fee": 0.01
  },
  "result_code": 200
}

失败响应参数

参数 类型 是否必填 最大长度 描述
result_code int 3 错误编码
result_message string 32 错误信息
sub_code string 不定 平台方返回错误码
  • 响应示例:
    {
    "result_code": 400,
    "result_message": "失败",
    "sub_code":"ERROR_CODE"
    }
    

results matching ""

    No results matching ""