> ## 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/address/refund` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

对直付地址支付单发起退款，只支持直付地址支付单，若提供的参数对应到闪兑支付单，会返回错误

## 说明

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


## OpenAPI

````yaml api-reference/version/100/cn/openapi/address-payment-openapi.json POST /v1/pay/address/refund
openapi: 3.0.1
info:
  title: GatePay 地址支付 API
  version: 1.0.0
  description: GatePay 地址支付接口（中文描述）
servers: []
security: []
paths:
  /v1/pay/address/refund:
    post:
      summary: 直付订单退款
      description: 对直付地址支付单发起退款
      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'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequest'
            example:
              refundRequestId: '483902480932841787'
              prepayId: '1665553233227833'
              refundAmount: '20'
              refundReason: test refund function
              receiverId: 598816
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundResponse'
              example:
                refundRequestId: '483902480932841787'
                prepayId: '1665553233227833'
                orderAmount: '14.9'
                refundAmount: '4.9'
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 商户客户端ID
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: 签名
      schema:
        type: string
        example: 672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: 时间戳（毫秒）
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机数
      schema:
        type: string
        example: '9578'
  schemas:
    RefundRequest:
      type: object
      properties:
        clientId:
          type: string
          description: 客户端ID
        mId:
          type: integer
          format: int64
          description: 商户ID（内部）
        refundGateId:
          type: string
          description: 商户请求退款编号
        prepayId:
          type: string
          description: 对应支付单订单id
        refundAmount:
          type: string
          description: 退款金额
        refundReason:
          type: string
          description: 退款原因
        receiverId:
          type: string
          description: 地址支付退款接收人在gate系统的user_id
    RefundResponse:
      type: object
      description: 直付地址支付单退款响应
      properties:
        refundRequestId:
          type: string
          description: 商户退款请求ID
        prepayId:
          type: string
          description: 拟退款的订单id
        orderAmount:
          type: string
          description: 订单金额
        refundAmount:
          type: string
          description: 退款金额
      required:
        - refundRequestId
        - prepayId
        - orderAmount
        - refundAmount

````