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

# 创建商户批量转账

> 创建商户批量转账订单，用于奖励分发场景。

## 概述

本页说明 `POST /v1/pay/batch/transfer` 接口，用于创建商户批量转账订单。完整的请求参数、响应结构与示例由上方关联的 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
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:
    post:
      tags:
        - reward-distribution
      summary: 创建商户批量转账
      description: 创建商户批量转账订单，用于奖励分发场景。
      operationId: createMerchantBatchTransfer
      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/RewardDistributionCreateRequest'
            examples:
              default:
                summary: 默认示例
                value:
                  bizscene: REWARD
                  merchant_batch_no: RB202606300001
                  currency: USDT
                  name: June Reward Distribution
                  description: monthly incentive
                  batchorderList:
                    - user_id: 100001
                      amount: '12.5'
                      currency: USDT
                      rewardId: reward_001
                    - user_id: 100002
                      amount: '8.8'
                      currency: USDT
                      rewardId: reward_002
      responses:
        '200':
          description: 批量转账创建结果
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardDistributionCreateResponse'
              examples:
                success:
                  summary: 创建成功
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      merchant_batch_no: RB202606300001
                      batch_id: '237394559478075550'
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:
    RewardDistributionCreateRequest:
      type: object
      description: 创建商户批量转账请求体。
      properties:
        bizscene:
          type: string
          description: 业务场景标识。
        merchant_batch_no:
          type: string
          description: 商户批次号，需由商户保证唯一。
        currency:
          type: string
          description: 批量转账币种。
        name:
          type: string
          description: 批量转账名称。
        description:
          type: string
          description: 批量转账描述。
        batchorderList:
          type: array
          description: 批量转账子单列表。
          items:
            $ref: '#/components/schemas/RewardDistributionOrderItem'
        channelId:
          type: string
          description: 渠道 ID，可选。
        is_coupon:
          type: boolean
          description: 是否优惠券场景，可选，默认 false。
      required:
        - merchant_batch_no
        - currency
        - batchorderList
    RewardDistributionCreateResponse:
      type: object
      description: 创建商户批量转账响应体。
      properties:
        status:
          type: string
          description: 接口响应结果，SUCCESS 或 FAIL。
        code:
          type: string
          description: 响应错误码。
        errorMessage:
          type: string
          description: 错误描述。
        data:
          $ref: '#/components/schemas/RewardDistributionCreateResult'
      required:
        - status
        - code
    RewardDistributionOrderItem:
      type: object
      description: 批量转账子单信息。
      properties:
        user_id:
          type: integer
          format: int64
          description: 收款用户 ID。
        amount:
          type: string
          description: 转账金额。
        currency:
          type: string
          description: 子单币种。
        rewardId:
          type: string
          description: 奖励单号/业务侧子单标识。
      required:
        - user_id
        - amount
    RewardDistributionCreateResult:
      type: object
      properties:
        merchant_batch_no:
          type: string
          description: 商户批次号。
        batch_id:
          type: string
          description: GatePay 生成的批量转账批次 ID。

````