# 退款结果通知

> 退款结果（txnType=REFUND）发送到原交易请求的 notifyUrl。

```yaml
openapi: 3.1.0
info:
  title: 退款结果通知
  version: 1.0.0
  description: 退款结果（txnType=REFUND）发送到原交易请求的 notifyUrl。
webhooks:
  refund.result:
    post:
      summary: 退款结果通知
      description: 退款结果（txnType=REFUND）发送到原交易请求的 notifyUrl。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                notifyType:
                  type: string
                  description: 通知类别。
                  x-onerway-signature-participation: included
                transactionId:
                  type: string
                  description: Onerway 退款交易号。应答通知时原样返回该值。
                  x-onerway-signature-participation: included
                paymentId:
                  type: string
                  description: 本次退款关联的支付意图 ID。
                  x-onerway-signature-participation: included
                txnType:
                  type: string
                  description: 交易操作类型；`REFUND` 表示退款结果。
                  x-onerway-signature-participation: included
                merchantNo:
                  type: string
                  description: Onerway 分配的商户号。
                  x-onerway-signature-participation: included
                merchantTxnId:
                  type: string
                  description: 本次退款的商户交易号；申请退款时未传入则由 Onerway 自动生成。
                  x-onerway-signature-participation: included
                originMerchantTxnId:
                  type: string
                  description: 原支付交易的商户交易号。
                  x-onerway-signature-participation: included
                responseTime:
                  type: string
                  description: Onerway 生成通知结果的时间，格式为 `yyyy-MM-dd HH:mm:ss`。
                  x-onerway-signature-participation: included
                txnTime:
                  type: string
                  description: 通知中的交易时间，格式为 `yyyy-MM-dd HH:mm:ss`。
                  x-onerway-signature-participation: included
                txnTimeZone:
                  type: string
                  description: 通知中交易时间使用的时区偏移。
                  x-onerway-signature-participation: included
                orderAmount:
                  type: string
                  description: 通知中的交易金额，以十进制字符串表示。币种见 `orderCurrency`。
                  x-onerway-signature-participation: included
                orderCurrency:
                  type: string
                  description: "`orderAmount` 对应的币种。"
                  x-onerway-signature-participation: included
                status:
                  type: string
                  description: 退款处理结果；`S` 表示成功，`F` 表示失败。
                  x-onerway-signature-participation: included
                cardBinCountry:
                  type: string
                  description: 卡 BIN 所属国家或地区。
                  x-onerway-signature-participation: included
                reason:
                  type: string
                  description: 以 JSON 字符串表示的结果说明，包含 `respCode` 和
                    `respMsg`。验签时直接使用收到的字段值，不要解析或重新序列化其中的 JSON。
                  x-onerway-signature-participation: included
                sign:
                  type: string
                  description: 兼容保留的请求体签名，不参与签名计算。该签名仅使用第一个启用的密钥生成；请使用 `X-Rh-Signature`
                    请求头中的签名验证通知。
                  x-onerway-signature-participation: signature-field
                paymentMethod:
                  type: string
                  description: 通知中的支付方式或卡品牌；该字段不参与签名计算。
                  x-onerway-signature-participation: excluded
                walletTypeName:
                  type: string
                  description: 通知中的钱包类型；该字段不参与签名计算。
                  x-onerway-signature-participation: excluded
                channelRequestId:
                  type: string
                  description: 支付渠道的请求标识。
                  x-onerway-signature-participation: included
                paymentMethodDetails:
                  type: string
                  description: 以 JSON 字符串表示的支付方式详情。验签时直接使用收到的字段值，不要解析或重新序列化其中的 JSON。
                  x-onerway-signature-participation: included
            examples:
              refund_succeeded:
                summary: 退款成功
                value:
                  notifyType: TXN
                  transactionId: demo_transactionId
                  paymentId: demo_paymentId
                  txnType: REFUND
                  merchantNo: demo_merchantNo
                  merchantTxnId: demo_merchantTxnId
                  originMerchantTxnId: demo_originMerchantTxnId
                  responseTime: 2026-09-14 00:05:29
                  txnTime: 2026-09-14 00:05:28
                  txnTimeZone: +08:00
                  orderAmount: "13.36"
                  orderCurrency: USD
                  status: S
                  cardBinCountry: US
                  reason: '{"respCode": "20000", "respMsg": "Success"}'
                  sign: replace_with_signature
                  paymentMethod: VISA
                  walletTypeName: ApplePay
                  channelRequestId: demo_channelRequestId
                  paymentMethodDetails: '{"card": {"checks": null, "holderName": null, "year":
                    null, "month": null, "cardType": "ApplePay",
                    "productCategory": null, "issuer": null, "cardBinCountry":
                    "US", "authorizationCode": null, "cardNumber":
                    "[REDACTED]"}}'
      responses:
        "200":
          description: "成功接收并受理通知后，返回 HTTP 200，使用 `Content-Type: text/plain`，并在响应体中原样返回收到的
            `transactionId`。未收到成功响应时，Onerway 每 30 分钟重试，最多 3 次。"
          content:
            text/plain:
              schema:
                type: string
              examples:
                return_transaction_id:
                  summary: 返回 transactionId
                  value: demo_transactionId
```
