# 退款结果

> 接收嵌入式金融退款申请的处理结果。

```yaml
openapi: 3.1.0
x-onerway-docs-version: original
x-onerway-spec-key: embedded-finance/webhooks/refund-result
info:
  title: 退款结果
  version: original
  description: 接收嵌入式金融退款申请的处理结果。
webhooks:
  refund.result:
    post:
      summary: 退款结果
      description: 接收嵌入式金融退款申请的处理结果。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                request_id:
                  type: string
                  description: 用于通知去重的唯一标识。
                  x-onerway-signature-participation: included
                event_type:
                  type: string
                  description: 事件类型标识。
                  x-onerway-constraints:
                    - kind: values
                      text: 此 Webhook 回调固定为 `EMFIN.BACK`。
                  x-onerway-signature-participation: included
                created_at:
                  type: string
                  description: 通知创建时间，采用 ISO 8601 格式。
                  x-onerway-signature-participation: included
                version:
                  type: string
                  description: Webhook 消息版本。
                  x-onerway-signature-participation: included
                data:
                  type: object
                  properties:
                    rechargeId:
                      type: integer
                      description: 退款申请中提交的充值 ID。
                    status:
                      type: string
                      description: 退款结果状态。
                      enum:
                        - S
                        - F
                      x-enum-descriptions:
                        S: 退款成功。
                        F: 退款失败，可再次发起申请退款。
                    failReason:
                      type:
                        - string
                        - "null"
                      description: 退款失败的原因。
                      x-onerway-constraints:
                        - kind: range
                          max: 512
                          unit: 字符
                      x-onerway-value:
                        nullable: true
                        when:
                          en: No failure reason is provided.
                          zh: 没有失败原因时返回 `null`。
                    bankRefundSerialNo:
                      type: string
                      description: 银行退款流水号。
                      x-onerway-constraints:
                        - kind: range
                          max: 64
                          unit: 字符
                  description: 退款结果。
                  x-onerway-signature-participation: included
            examples:
              refund_success:
                summary: 退款成功
                value:
                  request_id: "2099341314851209216"
                  event_type: EMFIN.BACK
                  created_at: 2026-09-14T11:35:47+08:00
                  version: v1.0
                  data:
                    rechargeId: 20993400850938
                    status: S
                    failReason: null
                    bankRefundSerialNo: 02f1f30f-4501-41bc-989f-391a21cd870c
                x-onerway-headers:
                  Content-Type: application/json;charset=UTF-8
                  x-timestamp: "1789356947"
                  x-signature: replace_with_hmac_sha256_signature
      responses:
        "200":
          description: 成功接收并受理通知后，返回 HTTP 200 和 `respCode=20000`；响应码不是 `20000` 时 Onerway
            会重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                  respMsg:
                    type: string
                required:
                  - respCode
                  - respMsg
              examples:
                return_success:
                  summary: 返回成功 JSON
                  value:
                    respCode: "20000"
                    respMsg: success
      x-onerway-verification:
        scheme: header-hmac
        signature:
          header: x-signature
          encoding: hex
        timestamp:
          header: x-timestamp
          tolerance: 300
        algorithm: hmac-sha256
        rule: timestamp-dot-raw-body
        reference: /zh/embedded-finance/api-reference/webhook-description
      x-onerway-header-fields:
        - name: x-signature
          schema:
            type: string
            description: Webhook 签名请求头。
        - name: x-timestamp
          schema:
            type: string
            description: Webhook 验证时间戳请求头。
```
