> ## Documentation Index
> Fetch the complete documentation index at: https://opendocs.xft.xin/llms.txt
> Use this file to discover all available pages before exploring further.

# 订单流水查询

## 功能说明

查询交易订单详情列表。

## 请求地址

`POST /order/outside/list`

## 请求参数

| 字段 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `merchant_code` | string(32) | 否 | 商户号 |
| `begin_date` | string(32) | 否 | 查询开始时间，格式 `yyyy-MM-dd HH:mm:ss` |
| `end_date` | string(32) | 否 | 查询结束时间，格式 `yyyy-MM-dd HH:mm:ss` |
| `page_no` | int | 否 | 页码，默认 1 |
| `page_size` | int | 否 | 每页数量，默认 20 |
| `xhj_trade_no` | string(64) | 否 | 新环境订单号 |
| `contract_no` | string(32) | 否 | 合同编码 |
| `states` | list | 否 | 状态列表集合。支付：`00` 成功、`01` 失败、`03` 部分退款、`04` 全部退款、`09` 待付款、`98` 关闭、`06` 撤销；退款：`00` 成功、`01` 失败、`09` 退款中 |
| `out_trade_no` | string(64) | 否 | 订单流水号 |
| `trade_type` | string(32) | 否 | 交易类型；`xft.trade.pay` 支付；`xft.trade.refund` 退款 |

## 请求示例

```json theme={"system"}
{
  "merchant_code": "226801000000865319122",
  "begin_date": "2023-09-01 00:00:00",
  "end_date": "2023-09-30 23:59:59",
  "page_no": 1,
  "page_size": 20
}
```

## 响应参数

| 字段 | 类型 | 说明 |
| - | - | - |
| `xhj_trade_no` | string | 新环境订单号 |
| `contract_no` | string | 合同编号 |
| `merchant_code` | string | 商户号 |
| `merchant_name` | string | 商户名称 |
| `out_trade_no` | string | 支付订单号 |
| `trade_type` | string | 交易类型；`xft.trade.pay` 支付；`xft.trade.refund` 退款 |
| `third_trade_no` | string | 第三方订单号 |
| `channel_trade_no` | string | 微信支付宝订单号 |
| `succ_time` | string | 交易完成时间，格式 `yyyy-MM-dd HH:mm:ss` |
| `sub_trade_no` | string | 子订单号 |
| `amount` | string | 金额，单位分 |
| `state` | string | 支付状态。支付：`00` 成功、`01` 失败、`03` 部分退款、`04` 全部退款、`09` 待付款、`98` 关闭、`06` 撤销；退款：`00` 成功、`01` 失败、`09` 退款中 |
| `real_fee` | string | 实际手续费，第二天对账完后更新，单位分 |
| `pre_fee` | string | 预计手续费，单位分 |
| `attach` | string | 备注 |
| `type` | string | 科目 |
| `created_at` | string | 创建订单时间，格式 `yyyy-MM-dd HH:mm:ss` |
| `product_code` | string | 支付产品编码；`POS` pos 订单、`FIXED_CODE` 聚合扫码、`WECHAT_SWIPING_CARD` 微信刷卡支付、`ALIPAY_BAR_CODE` 支付宝条码支付、`DIGITAL_SWIPING_CARD` 数字钱包 |
| `product` | string | 支付产品描述，例如：微信刷卡支付 |

## 响应示例

```json theme={"system"}
[
  {
    "xhj_trade_no": "202309120303127366",
    "contract_no": "HT202309120001",
    "merchant_code": "226801000000865319122",
    "merchant_name": "测试商户",
    "out_trade_no": "ea51203e1a0146d7954b39ac88aecaf7",
    "trade_type": "xft.trade.pay",
    "third_trade_no": "202309120303127366",
    "channel_trade_no": "4200001234202309120000000000",
    "succ_time": "2023-09-12 15:30:00",
    "sub_trade_no": "SUB202309120001",
    "amount": "100",
    "state": "00",
    "real_fee": "1",
    "pre_fee": "1",
    "attach": "测试001",
    "type": "消费",
    "created_at": "2023-09-12 15:29:50",
    "product_code": "FIXED_CODE",
    "product": "聚合扫码"
  }
]
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.