> ## 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.

# 商户批量转账订单查询

> 根据 batch_id 或 merchant_batch_no 查询商户批量转账订单及子单状态。

## 概述

本页说明 `POST /v1/pay/batch/transfer/query` 接口，用于查询商户批量转账订单及子单状态。完整的请求参数、响应结构与示例由上方关联的 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/withdraw-openapi.json POST /v1/pay/batch/transfer/query
openapi: 3.1.0
info:
  title: GatePay 提现与钱包 API
  version: 1.0.0
  description: >-
    基于 GatePay 提现与钱包相关文档整理的 OpenAPI 3.1
    规范。涵盖批量提现下单、提现订单查询、币种链查询、账户总额查询以及提现手续费查询等接口。
servers:
  - url: https://openplatform.gateapi.io
    description: 生产环境
security: []
paths:
  /v1/pay/batch/transfer/query:
    post:
      tags:
        - reward-distribution
      summary: 商户批量转账订单查询
      description: 根据 batch_id 或 merchant_batch_no 查询商户批量转账订单及子单状态。
      operationId: queryMerchantBatchTransfer
      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'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of-Optional'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RewardDistributionQueryRequest'
            examples:
              default:
                summary: 默认示例
                value:
                  merchant_batch_no: RB202606300001
                  detail_status: ALL
      responses:
        '200':
          description: 批量转账订单详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardDistributionQueryResponse'
              examples:
                success:
                  summary: 查询成功
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      batch_id: '237394559478075550'
                      merchant_id: 10002
                      merchant_batch_no: RB202606300001
                      status: SUCCESS
                      currency: USDT
                      channel_id: '123456'
                      orders_list:
                        - receiver_id: 100001
                          amount: '12.5'
                          currency: USDT
                          status: SUCCESS
                          reward_id: reward_001
                          transaction_id: '0xabc123'
                          create_time: 1751263200000
                          channel_id: '123456'
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-Optional:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: false
      schema:
        type: string
      description: 非必填代理归属请求头。需要在机构代理上下文中标识请求发起方账户 ID 时传入；未使用机构代理上下文时可不传。
  schemas:
    RewardDistributionQueryRequest:
      type: object
      description: 商户批量转账订单查询请求体。
      properties:
        batch_id:
          type: string
          description: GatePay 批次 ID，与 merchant_batch_no 二选一传入即可。
        merchant_batch_no:
          type: string
          description: 商户批次号，与 batch_id 二选一传入即可。
        detail_status:
          type: string
          description: 子单状态筛选：ALL、PROCESSING、SUCCESS、FAIL。
    RewardDistributionQueryResponse:
      type: object
      description: 商户批量转账订单查询响应体。
      properties:
        status:
          type: string
          description: 接口响应结果，SUCCESS 或 FAIL。
        code:
          type: string
          description: 响应错误码。
        errorMessage:
          type: string
          description: 错误描述。
        data:
          $ref: '#/components/schemas/RewardDistributionQueryResult'
      required:
        - status
        - code
    RewardDistributionQueryResult:
      type: object
      properties:
        batch_id:
          type: string
          description: 批次 ID。
        merchant_id:
          type: integer
          format: int64
          description: 商户 ID。
        merchant_batch_no:
          type: string
          description: 商户批次号。
        status:
          type: string
          description: 批次状态：PROCESSING、SUCCESS、FAIL 等。
        currency:
          type: string
          description: 批次币种。
        channel_id:
          type: string
          description: 渠道 ID。
        orders_list:
          type: array
          description: 子单列表。
          items:
            $ref: '#/components/schemas/RewardDistributionOrderResult'
    RewardDistributionOrderResult:
      type: object
      properties:
        receiver_id:
          type: integer
          format: int64
          description: 收款用户 ID。
        amount:
          type: string
          description: 转账金额。
        currency:
          type: string
          description: 币种。
        status:
          type: string
          description: 子单状态：PROCESSING、SUCCESS、FAIL。
        reward_id:
          type: string
          description: 奖励单号/业务侧子单标识。
        transaction_id:
          type: string
          description: 交易 ID。
        create_time:
          type: integer
          format: int64
          description: 创建时间。
        channel_id:
          type: string
          description: 渠道 ID。

````