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

# 查询退款详情

> 根据商户退款单id查询退款详情。

## 概述

本页说明 `GET /payment/open/institution/v2/pay/refund/details` 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。

## 说明

* 认证方式使用 GatePay 标准签名请求头。
* 本页展示同一接口的机构路径版本。
* 除创建子账户、查询子账户详情、分页查询子账户外，机构侧请求需携带 `X-GatePay-On-Behalf-Of`。
* 通用签名规则请参见 [/api-reference/version/100/cn/common/securityAndSignature](/api-reference/version/100/cn/common/securityAndSignature)。


## OpenAPI

````yaml api-reference/version/100/cn/openapi/institution/checkout-payment-openapi.json GET /payment/open/institution/v2/pay/refund/details
openapi: 3.1.0
info:
  title: GatePay 机构收银台支付 API
  description: Gate Pay 收银台支付 API，用于收银台下单、退款及订单查询。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io
security: []
paths:
  /payment/open/institution/v2/pay/refund/details:
    get:
      summary: 查询退款详情
      description: 根据商户退款单id查询退款详情。
      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: refundRequestId
          in: query
          required: true
          description: 商户生成的退款单id
          schema:
            type: string
            example: '202508271923022'
        - $ref: '#/components/parameters/X-GatePay-On-Behalf-Of'
      responses:
        '200':
          description: 查询成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundDetailsResponse'
              examples:
                successResponse:
                  summary: 成功响应
                  value:
                    status: SUCCESS
                    code: '000000'
                    errorMessage: ''
                    data:
                      refundRequestId: '202508271923022'
                      gateRefundId: '1991045981847818240'
                      refundId: '1991045981847818240'
                      orderId: '35214673103159414'
                      merchantTradeNo: '163'
                      createTime: 1724769600000
                      transactTime: 1724769660000
                      transactionId: '1991045981847818241'
                      txHash: 0x1234...
                      orderAmount: '10'
                      orderCurrency: USDT
                      requestAmount: '0.018'
                      requestCurrency: USDT
                      amount: '0.018'
                      currency: USDT
                      status: SUCCESS
                      remark: bourne-test
                      refund_style: 2
                      refund_pay_channel: 1
                      refund_address: '0x86608d3C9f979b98a3b2417216eD859d313E339D'
                      refund_chain: ETH
                      refund_bear_type: 1
                      refund_amount_type: 2
                      refund_account_type: 1
                      refund_gas_amount: '0.001'
                      refund_fail_reason: ''
                      refund_to_gate_uid: '10002'
                      channelId: '123456'
                      nickName: testUser
                      payerId: '10001'
                      fromAddress: 0x1234...
                      payChannel: 1
                      billType: 1
                      goodsName: charge
                      totalRequestAmount: '0.018'
                      totalRequestCurrency: USDT
                      totalReceiveAmount: '0.018'
                      totalReceiveCurrency: USDT
                      refundDetails:
                        - transactionId: '1991045981847818241'
                          transactTime: 1724769660000
                          payChannel: 1
                          status: SUCCESS
                          amount: '0.018'
                          currency: USDT
                          chain: ETH
                          address: '0x86608d3C9f979b98a3b2417216eD859d313E339D'
                          hash: 0x1234...
                          remark: ''
                          billType: 1
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: 商户客户端ID
      schema:
        type: string
        example: mZ96D37oKk-HrWJc
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: 签名
      schema:
        type: string
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: 时间戳（毫秒）
      schema:
        type: string
        example: '1695611256106'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: 随机数
      schema:
        type: string
        example: '1260554069'
    X-GatePay-On-Behalf-Of:
      name: X-GatePay-On-Behalf-Of
      in: header
      required: true
      schema:
        type: string
      description: >-
        必填代理归属请求头。请填写本次请求的发起方账户 ID；在机构代理商户 API 中通常填写目标子账户 ID，在机构代扣与划转接口中可填写机构账户
        ID 或子账户 ID。
  schemas:
    RefundDetailsResponse:
      type: object
      properties:
        status:
          type: string
          description: 响应状态
          example: SUCCESS
        code:
          type: string
          description: 响应码
          example: '000000'
        errorMessage:
          type: string
          description: 错误信息
          example: ''
        data:
          $ref: '#/components/schemas/RefundDetailsData'
    RefundDetailsData:
      type: object
      properties:
        refundRequestId:
          type: string
          description: 商户退款请求Id
        gateRefundId:
          type: string
          description: Gate退款单Id
        refundId:
          type: string
          description: 退款单Id
        orderId:
          type: string
          description: 订单Id
        merchantTradeNo:
          type: string
          description: 商户订单号
        createTime:
          type: integer
          format: int64
          description: 创建时间
        transactTime:
          type: integer
          format: int64
          description: 交易时间
        transactionId:
          type: string
          description: 交易ID
        txHash:
          type: string
          description: 交易哈希
        orderAmount:
          type: string
          description: 订单金额
        orderCurrency:
          type: string
          description: 订单币种
        requestAmount:
          type: string
          description: 请求退款金额
        requestCurrency:
          type: string
          description: 请求退款币种
        amount:
          type: string
          description: 实际退款金额
        currency:
          type: string
          description: 退款币种
        status:
          type: string
          description: 退款状态
          enum:
            - PENDING
            - PROCESS
            - CHECK
            - SUCCESS
            - FAIL
        remark:
          type: string
          description: 备注
        refund_style:
          type: integer
          description: 退款方式
        refund_pay_channel:
          type: integer
          description: 退款支付渠道
        refund_address:
          type: string
          description: 退款地址
        refund_chain:
          type: string
          description: 退款网络
        refund_bear_type:
          type: integer
          description: 退款承担类型
        refund_amount_type:
          type: integer
          description: 退款金额类型
        refund_account_type:
          type: integer
          description: 退款账户类型
        refund_gas_amount:
          type: string
          description: 退款Gas费
        refund_fail_reason:
          type: string
          description: 退款失败原因
        refund_to_gate_uid:
          type: integer
          format: int64
          description: 退款至Gate用户Id
        channelId:
          type: string
          description: 客户名称
        nickName:
          type: string
          description: 昵称
        payerId:
          type: integer
          format: int64
          description: 付款人Id
        fromAddress:
          type: string
          description: 来源地址
        payChannel:
          type: string
          description: 支付渠道
        billType:
          type: string
          description: 账单类型
        goodsName:
          type: string
          description: 商品名称
        totalRequestAmount:
          type: string
          description: 总请求退款金额
        totalRequestCurrency:
          type: string
          description: 总请求退款币种
        totalReceiveAmount:
          type: string
          description: 总实际到账金额
        totalReceiveCurrency:
          type: string
          description: 总实际到账币种
        refundDetails:
          type: array
          items:
            $ref: '#/components/schemas/RefundDetailItem'
    RefundDetailItem:
      type: object
      properties:
        transactionId:
          type: string
          description: 交易ID
        transactTime:
          type: integer
          format: int64
          description: 交易时间
        payChannel:
          type: integer
          description: 支付渠道
        status:
          type: string
          description: 状态
          enum:
            - PENDING
            - PROCESS
            - CHECK
            - SUCCESS
            - FAIL
        amount:
          type: string
          description: 金额
        currency:
          type: string
          description: 币种
        chain:
          type: string
          description: 链
        address:
          type: string
          description: 地址
        hash:
          type: string
          description: 交易哈希；不同业务回调中可能展示为 hash、txHash 或 tx_hash
        remark:
          type: string
          description: 备注
        billType:
          type: integer
          description: 账单类型

````