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

# 确认已付款

> 通知系统商户已完成线下法币汇款。该接口使用 multipart/form-data。生成签名时请使用纯文本串 "timestamp\nnonce\n\n"，不要拼接 multipart 请求体。

## 概述

本页说明 `POST /open/otc/api/recharge/confirm` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 本页展示普通商户接口。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。

## 补充字段说明

* `client_order_id`：兼容旧版确认已付款请求时使用的商户订单号字段。
* 如同时传入 `orderId` 与 `client_order_id`，建议优先以当前订单 ID 方式接入，并按平台最新 OpenAPI 定义上传付款凭证文件。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/otc-fiat-openapi.json POST /open/otc/api/recharge/confirm
openapi: 3.1.0
info:
  title: GatePay OTC 法币 API
  description: OTC 法币出金与入金 API 参考。
  version: 2.1.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /open/otc/api/recharge/confirm:
    post:
      summary: 确认 OTC 入金已付款
      description: >-
        通知系统商户已完成线下法币汇款。该接口使用 multipart/form-data。生成签名时请使用纯文本串
        "timestamp\nnonce\n\n"，不要拼接 multipart 请求体。
      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: X-GatePay-MerchantId
          in: header
          required: true
          schema:
            type: integer
            format: int64
          description: 商户 ID。
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ConfirmRequest'
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtcRechargeConfirmResponse'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      schema:
        type: string
      description: 用于标识调用应用的商户应用 ClientId。
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      schema:
        type: string
      description: 按 GatePay 签名规则生成的 HMAC 签名。
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      schema:
        type: string
      description: 用于防重放和验签的 Unix 时间戳。
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      schema:
        type: string
      description: 与时间戳配合使用的随机串，用于防止重放攻击。
  schemas:
    ConfirmRequest:
      type: object
      properties:
        orderId:
          type: string
          description: 需要确认的 OTC 入金订单 ID。
        file:
          type: string
          format: binary
          description: 付款凭证文件。最大 4 MB，支持 jpg、jpeg、png、pdf。
      required:
        - orderId
        - file
      example:
        orderId: '71347515709194240'
        file: (binary)
    OtcRechargeConfirmResponse:
      type: object
      properties:
        code:
          type: string
          description: 业务响应码。
        status:
          type: string
          description: 请求顶层状态。
        errorMessage:
          type: string
          description: 请求失败时的错误信息。
        data:
          type: object
          properties:
            success:
              type: boolean
              description: 确认操作是否成功。

````