# 虚拟账户销户结果

> 接收虚拟账户销户请求的处理结果。

```yaml
openapi: 3.1.0
x-onerway-docs-version: original
x-onerway-spec-key: embedded-finance/webhooks/virtual-account-closure
info:
  title: 虚拟账户销户结果
  version: original
  description: 接收虚拟账户销户请求的处理结果。
webhooks:
  virtual.account.closure:
    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.CLOSE_VA_RESULT`。
                  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:
                    vaApplicationId:
                      type: integer
                      description: 销户请求使用的虚拟账户申请 ID。
                    merchantNo:
                      type: string
                      description: 虚拟账户所属的商户号。
                    userId:
                      type: integer
                      description: 申请销户的虚拟账户所属用户 ID。
                    accountNumber:
                      type: string
                      description: 虚拟账户账号。
                      x-onerway-constraints:
                        - kind: range
                          max: 64
                          unit: 字符
                    sortCode:
                      type: string
                      description: 虚拟账户的银行 sort code。
                      x-onerway-constraints:
                        - kind: range
                          max: 32
                          unit: 字符
                    status:
                      type: string
                      description: 虚拟账户销户状态。
                      enum:
                        - S
                        - F
                      x-enum-descriptions:
                        S: 虚拟账户销户成功。
                        F: 虚拟账户销户失败。
                    failReason:
                      type: string
                      description: 销户未成功时的原因。
                      x-onerway-constraints:
                        - kind: range
                          max: 512
                          unit: 字符
                      x-onerway-value:
                        empty: true
                        when:
                          en: The success example contains an empty string.
                          zh: 成功示例中为空字符串。
                    ownerName:
                      type: string
                      description: 虚拟账户户名。
                      x-onerway-constraints:
                        - kind: range
                          max: 256
                          unit: 字符
                    completeDate:
                      type: string
                      description: 销户完成日期，格式为 YYYY-MM-DD。
                    vaCloseReason:
                      type: string
                      description: 销户请求中提交的销户原因。
                      x-onerway-constraints:
                        - kind: range
                          max: 512
                          unit: 字符
                  description: 虚拟账户销户结果。
                  x-onerway-signature-participation: included
            examples:
              closure_success:
                summary: 虚拟账户销户成功
                value:
                  request_id: "2099342723713728512"
                  event_type: EMFIN.CLOSE_VA_RESULT
                  created_at: 2026-09-14T11:41:23+08:00
                  version: v1.0
                  data:
                    vaApplicationId: 987654321
                    merchantNo: 800***
                    userId: 12345678
                    accountNumber: "00007852"
                    sortCode: "040893"
                    status: S
                    failReason: ""
                    ownerName: SAN ZHANG
                    completeDate: 2026-09-14
                    vaCloseReason: VA Cancellation Reason
                x-onerway-headers:
                  Content-Type: application/json;charset=UTF-8
                  x-timestamp: "1789357283"
                  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 验证时间戳请求头。
```
