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

# 资金流水

> 查询资金流水账单列表。

## 概述

本页说明 `GET /payment/open/institution/v1/pay/bill/orderlist` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 本页展示同一接口的机构路径版本。
* 除创建子账户、查询子账户详情、分页查询子账户外，机构侧请求需携带 `X-GatePay-On-Behalf-Of`。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institution/fund-records-openapi.json GET /payment/open/institution/v1/pay/bill/orderlist
openapi: 3.1.0
info:
  title: GatePay 机构资金流水 API
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v1/pay/bill/orderlist:
    get:
      summary: 获取资金流水账单
      description: 查询资金流水账单列表。
      operationId: getBillOrderList
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
        - name: startTime
          in: query
          required: true
          schema:
            type: integer
            format: int64
          description: 开始时间，单位毫秒
        - name: endTime
          in: query
          required: true
          schema:
            type: integer
            format: int64
          description: 结束时间，单位毫秒
        - name: page
          in: query
          required: true
          schema:
            type: integer
          description: 分页编号，从 1 开始
        - name: count
          in: query
          required: true
          schema:
            type: integer
          description: 获取一页条数，最大 500
        - name: currency
          in: query
          required: false
          schema:
            type: string
          description: 搜索币种
        - name: financialType
          in: query
          required: false
          schema:
            type: string
          description: >-
            财务类型：参考财务类型定义，包含收款 (receipt_fi)、礼品卡 (giftCard_fi)、奖励
            (reward_fi)、下发/提现 (distribution_fi)、退款 (refund_fi)、划转
            (transfer_fi)、闪兑买 (convert_buy_fi)、闪兑卖 (convert_sell_fi)、闪兑退款
            (convert_refund_fi)、法币充值 (otcRecharge_add_fi)、法币提现 (otcWithdraw_fi)
            及其他 (others_fi)
        - name: orderType
          in: query
          required: false
          schema:
            type: integer
          description: 查询订单类型：1-商户订单号 2-GatePay订单号 3-资金流水订单号
        - name: orderIdNo
          in: query
          required: false
          schema:
            type: string
          description: 查询单号
        - name: transactionType
          in: query
          required: false
          schema:
            type: integer
          description: 收支类型：1-收入 2-支出
        - name: timeType
          in: query
          required: false
          schema:
            type: integer
            format: int64
          description: 时间查询类型：1-创建时间查询 2-退款资金时间
        - name: status
          in: query
          required: false
          schema:
            type: string
          description: 退款状态：SUCCESS-成功 FAIL-失败
        - name: sortType
          in: query
          required: false
          schema:
            type: string
          description: 排序方式：pay_time_desc-入账时间降序 pay_time_asc-入账时间升序，默认 pay_time_desc
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_BillOrderList'
              examples:
                successResponse:
                  summary: 成功响应
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      merchant_id: 10002
                      total: 18
                      hasNext: true
                      nextPage: 4
                      balance_history_item_list:
                        - transactId: '355711415868440576'
                          transactTime: 1746769810346
                          orderId: '355450733498011648'
                          merchantTradeNo: '1746707644001'
                          originalOrderId: '355400733498011600'
                          originalMerchantTradeNo: '1746707600001'
                          financialType: refund_fi
                          payAmount: '-1'
                          currency: USDT
                          Balance: '934183.9783514209'
                          BalanceCurrency: USDT
                          status: PAID
                          payer: 10002
                          buyer: ''
                          fullChain: ''
                          hash: ''
                          address: TMB5f9CgcnYR365knMXKrMM6aGoYpphquj
                          payChannel: mini_pay
                          refund_gate_id: '13411853592035330'
                        - transactId: '355711310076907520'
                          transactTime: 1746769785136
                          orderId: '355450733498011648'
                          merchantTradeNo: '1746707644001'
                          originalOrderId: '355400733498011600'
                          originalMerchantTradeNo: '1746707600001'
                          financialType: refund_fi
                          payAmount: '+1'
                          currency: USDT
                          Balance: '934184.9783514209'
                          BalanceCurrency: USDT
                          status: PAID
                          payer: 10002
                          buyer: ''
                          fullChain: ''
                          hash: ''
                          address: TMB5f9CgcnYR365knMXKrMM6aGoYpphquj
                          payChannel: mini_pay
                          refund_gate_id: '13411849297068033'
                        - transactId: '355711310076907520'
                          transactTime: 1746769785131
                          orderId: '355450733498011648'
                          merchantTradeNo: '1746707644001'
                          originalOrderId: '355400733498011600'
                          originalMerchantTradeNo: '1746707600001'
                          financialType: refund_fi
                          payAmount: '-1'
                          currency: USDT
                          Balance: '934183.9783514209'
                          BalanceCurrency: USDT
                          status: PAID
                          payer: 10002
                          buyer: ''
                          fullChain: ''
                          hash: ''
                          address: TMB5f9CgcnYR365knMXKrMM6aGoYpphquj
                          payChannel: mini_pay
                          refund_gate_id: '13411849297068033'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 商户客户端ID，在 GatePay 平台申请获得
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256签名，用于验证请求合法性
      schema:
        type: string
        example: >-
          672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: 时间戳（毫秒），与服务器时间差不能超过5分钟
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机数，用于防止重放攻击
      schema:
        type: string
        example: '3525756760'
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        必填代理归属请求头。请填写本次请求的发起方账户 ID；在机构代理商户 API 中通常填写目标子账户 ID，在机构代扣与划转接口中可填写机构账户
        ID 或子账户 ID。
  schemas:
    ApiResponse_BillOrderList:
      type: object
      properties:
        status:
          type: string
          description: 响应状态
          example: SUCCESS
        code:
          type: string
          description: 响应码
          example: '000000'
        errorMessage:
          type: string
          description: 错误信息
          example: ''
        data:
          $ref: '#/components/schemas/BillOrderListData'
      required:
        - status
        - code
    BillOrderListData:
      type: object
      properties:
        merchant_id:
          type: integer
          description: 供货商Id
        total:
          type: integer
          description: 总记录数
        hasNext:
          type: boolean
          description: |-
            是否有下一页
            true: 表示有
            false:表示没有
        nextPage:
          type: integer
          description: 下一页page编号,当hasNext为true该字段才有效
        balance_history_item_list:
          type: array
          items:
            $ref: '#/components/schemas/BalanceHistoryItem'
    BalanceHistoryItem:
      type: object
      properties:
        transactId:
          type: string
          description: 支付流水单号
        transactTime:
          type: integer
          format: int64
          description: 入账时间，毫秒时间戳
        orderId:
          type: string
          description: GatePay订单号
        merchantTradeNo:
          type: string
          description: 商户订单号
        originalOrderId:
          type: string
          description: 关联的 Gate Pay 原始订单号
        originalMerchantTradeNo:
          type: string
          description: 原始 Gate Pay 订单对应的商户订单号
        financialType:
          type: string
          description: 财务类型
        payAmount:
          type: string
          description: 收支金额
        currency:
          type: string
          description: 收支币种
        Balance:
          type: string
          description: 账户余额
        BalanceCurrency:
          type: string
          description: 账户余额币种
        status:
          type: string
          description: PAID表示成功
        payer:
          type: integer
          format: int64
          description: Gate 支付付款用户UID
        buyer:
          type: string
          description: 对于Web3支付，该值为付款地址；对于非Web3支付，该值为付款人UID
        refund_gate_id:
          type: string
          description: 退款订单ID
        payChannel:
          type: string
          description: |-
            支付方式:
            Web3 支付
            Gate 支付
        fullChain:
          type: string
          description: 支付网络全称
        address:
          type: string
          description: 商家收款地址
        hash:
          type: string
          description: 交易Hash
        billType:
          type: integer
          description: 账单类型
        business:
          type: string
          description: 业务类型
        buyCurrency:
          type: string
          description: 买入币种
        sellCurrency:
          type: string
          description: 卖出币种
        rate:
          type: string
          description: 兑换比率：sellCurrency ≈ buyCurrency * rate

````