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

# Create Refund

> Cashier's refund interface V2. Supports original or specified refund style, Gate or Web3 refund channel, and more options.

## Overview

This page documents the `POST /payment/open/institution/v2/standard/order/refund` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the standard merchant endpoint.
* `refundRequestId` is the merchant-side unique refund request identifier and should be used when querying refund details.
* `refundBearType` is a numeric enum in the request body.
* Refunds initiated manually from the merchant console should be understood separately from API callback behavior.
* For operational reconciliation, persist `refundRequestId`, the original order identifier, and the corresponding query result together.
* 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/institution/checkout-payment-openapi.json POST /payment/open/institution/v2/standard/order/refund
openapi: 3.1.0
info:
  title: GatePay API
  description: >-
    GatePay Checkout Payment API - Create orders at the cashier, process
    refunds, and query order/refund details.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v2/standard/order/refund:
    post:
      summary: Create Refund
      description: >-
        Cashier's refund interface V2. Supports original or specified refund
        style, Gate or Web3 refund channel, and more options.
      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'
      requestBody:
        description: Refund V2 request parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundV2Request'
            examples:
              basicExample:
                summary: Basic Example
                value:
                  prepayId: '35214673103159414'
                  refundRequestId: '202508271923022'
                  refundStyle: 2
                  refundToGateUid: '10002'
                  refundAmount: '0.018'
                  refundCurrency: USDT
                  refundPayChannel: 1
                  refundReason: bourne-test
                  refundBearType: 1
        required: true
      responses:
        '200':
          description: Refund request submitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundV2Response'
              examples:
                successResponse:
                  summary: Success Response
                  value:
                    code: '000000'
                    data:
                      refundRequestId: '202508271923022'
                      refundGateId: '1991045981847818240'
                      prepayId: '35214673103159414'
                      orderAmount: '10'
                      refundAmount: '0.018'
                      errMsg: ''
                      orderCurrency: USDT
                      payCurrency: USDT
                      payAmount: '0.018'
                    status: SUCCESS
                    errorMessage: ''
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
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256 signature for request validation
      schema:
        type: string
        example: >-
          672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77
    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
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random nonce for replay attack prevention
      schema:
        type: string
        example: '9578'
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        Required delegated-subject header. Provide the initiating account ID for
        this request. For institution merchant APIs, this is typically the
        target sub-account ID; for institution charge and transfer APIs, it can
        be either an institution account ID or a sub-account ID.
  schemas:
    RefundV2Request:
      type: object
      required:
        - refundRequestId
        - prepayId
        - refundAmount
        - refundReason
      properties:
        refundRequestId:
          type: string
          description: Merchant refund request ID
        prepayId:
          type: string
          description: Pre-order ID
        refundAmount:
          type: string
          description: Refund amount
        refundReason:
          type: string
          description: Reason for refund
        refundStyle:
          type: integer
          format: int64
          description: '1: Original, 2: Specified'
        refundPayChannel:
          type: integer
          format: int64
          description: '1: Gate, 2: Web3'
        refundToGateUid:
          type: string
          description: Gate user ID for refund recipient
        refundAddress:
          type: string
          description: Refund address
        refundChain:
          type: string
          description: Chain for refund
        refundBearType:
          type: integer
          description: '1: Merchant, 2: User'
          format: int64
        memo:
          type: string
          description: Memo
        needNotify:
          type: boolean
          description: >-
            Whether to trigger refund result notification; true means
            notifications are sent to the callback URL configured for the
            merchant
        refundLimit:
          type: boolean
          description: Refund limit flag
        refundCurrency:
          type: string
          description: Refund currency
        refundFundStatementId:
          type: integer
          format: int64
          description: Refund fund statement ID
        refundSource:
          type: integer
          format: int64
          description: '0: Order, 1: Transaction'
    RefundV2Response:
      type: object
      properties:
        status:
          type: string
          description: Response status
        code:
          type: string
          description: Response code
        errorMessage:
          type: string
          description: Error message
        data:
          $ref: '#/components/schemas/RefundV2Data'
    RefundV2Data:
      type: object
      properties:
        refundRequestId:
          type: string
          description: Merchant refund request ID
        prepayId:
          type: string
          description: Pre-order ID
        refundGateId:
          type: string
          description: GatePay refund ID
        orderAmount:
          type: string
          description: Order amount
        refundAmount:
          type: string
          description: Refund amount
        errMsg:
          type: string
          description: Error message
        orderCurrency:
          type: string
          description: Order currency
        payCurrency:
          type: string
          description: Refund currency
        payAmount:
          type: string
          description: Merchant pay amount

````