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

# Address Payment Direct Refund

> Initiate a refund for the direct address payment order, which is only applicable to the direct address payment order.

## Overview

This page documents the `POST /v1/pay/address/refund` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

Refund a standard order through the institution path.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the institution-path variant of the same API.
* Except for sub-account creation and sub-account query APIs, institution requests should include `X-GatePay-On-Behalf-Of`.
* For shared signing rules, see [/api-reference/version/100/en/common/securityAndSignature](/api-reference/version/100/en/common/securityAndSignature).


## OpenAPI

````yaml /api-reference/version/100/en/openapi/address-payment-openapi.json POST /v1/pay/address/refund
openapi: 3.1.0
info:
  title: GatePay Address Payment API
  description: GatePay Address Payment APIs for crypto payment via blockchain address.
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /v1/pay/address/refund:
    post:
      summary: Refund (Direct Payment)
      description: >-
        Initiate a refund for the direct address payment order, which is only
        applicable to the direct address payment order.
      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: SUCCESS
          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: Merchant client ID, obtained from GatePay platform
      schema:
        type: string
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256 signature for request validation
      schema:
        type: string
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: >-
        Timestamp in milliseconds, must not differ from server time by more than
        5 minutes
      schema:
        type: string
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random nonce for replay attack prevention
      schema:
        type: string
  schemas:
    RefundRequest:
      type: object
      required:
        - refundRequestId
        - prepayId
        - refundAmount
        - receiverId
      properties:
        refundRequestId:
          type: string
          description: The merchant's refund request ID
        prepayId:
          type: string
          description: The ID of the corresponding payment order
        refundAmount:
          type: string
          description: The amount to be refunded
        refundReason:
          type: string
          description: The reason for the refund
        receiverId:
          type: string
          description: The Gate user ID of the recipient of the refund for address payment
    RefundResponse:
      type: object
      description: Response to request for refund of non-convert payment order
      properties:
        refundRequestId:
          type: string
          description: Merchant's refund request id
        prepayId:
          type: string
          description: The id of the payment order to be refunded
        orderAmount:
          type: string
          description: The amount of the original payment order
        refundAmount:
          type: string
          description: The amount to be refunded

````