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

# 取消入金订单

> 在确认付款前取消 OTC 入金订单。

## 概述

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

## 说明

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


## OpenAPI

````yaml api-reference/version/100/cn/openapi/otc-fiat-openapi.json POST /open/otc/api/recharge/cancel
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/cancel:
    post:
      summary: 取消 OTC 入金订单
      description: 在确认付款前取消 OTC 入金订单。
      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:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelRequest'
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtcRechargeCancelResponse'
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:
    CancelRequest:
      type: object
      properties:
        orderId:
          type: string
          description: 需要取消的订单 ID。
      required:
        - orderId
      example:
        orderId: '71347515709194240'
    OtcRechargeCancelResponse:
      type: object
      properties:
        code:
          type: string
          description: 业务响应码。
        status:
          type: string
          description: 请求顶层状态。
        errorMessage:
          type: string
          description: 请求失败时的错误信息。
        data:
          type: object
          properties:
            success:
              type: boolean
              description: 取消操作是否成功。

````