# 入金通知

> 接收入金通知。

```yaml
openapi: 3.1.0
x-onerway-docs-version: original
x-onerway-spec-key: embedded-finance/webhooks/deposit-notification
info:
  title: 入金通知
  version: original
  description: 接收入金通知。
webhooks:
  deposit.notification:
    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.RECHARGE`。
                  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。
                    merchantNo:
                      type: string
                      description: 该笔入金所属的商户号。
                    remark:
                      type: string
                      description: 银行侧交易附言。
                      x-onerway-constraints:
                        - kind: range
                          max: 200
                          unit: 字符
                    currencyCode:
                      type: string
                      description: 入金币种。
                      x-onerway-constraints:
                        - kind: range
                          max: 3
                          unit: 字符
                    transAmount:
                      type: number
                      description: 入金金额。
                    isReturn:
                      type: string
                      description: 入账场景标识；取值为字符串，而非 JSON 布尔值。
                      enum:
                        - "false"
                        - "true"
                      x-enum-descriptions:
                        "false": 正常入账。
                        "true": 退回被拒后的入账。
                    createTime:
                      type: string
                      description: 入金创建时间，格式为 YYYY-MM-DD HH:mm:ss。
                    completeTime:
                      type: string
                      description: 入金完成时间，格式为 YYYY-MM-DD HH:mm:ss。
                    remitAccountIban:
                      type: string
                      description: 汇款账户 IBAN。
                      x-onerway-constraints:
                        - kind: range
                          max: 32
                          unit: 字符
                    remitterName:
                      type: string
                      description: 汇款人名称。
                      x-onerway-constraints:
                        - kind: range
                          max: 256
                          unit: 字符
                    remittanceBank:
                      type: string
                      description: 汇款银行名称。
                    payeeName:
                      type: string
                      description: 收款人名称。
                      x-onerway-constraints:
                        - kind: range
                          max: 256
                          unit: 字符
                    mainAccountNo:
                      type: string
                      description: 收款人账号。
                      x-onerway-constraints:
                        - kind: range
                          max: 256
                          unit: 字符
                    bankSerialNo:
                      type: string
                      description: 银行流水号。
                      x-onerway-constraints:
                        - kind: range
                          max: 64
                          unit: 字符
                    sortCode:
                      type: string
                      description: 付款方银行账户的 sort code。
                      x-onerway-constraints:
                        - kind: range
                          max: 20
                          unit: 字符
                    payerCountry:
                      type: string
                      description: 付款方国家或地区代码。
                      x-onerway-constraints:
                        - kind: range
                          max: 20
                          unit: 字符
                    paymentRail:
                      type: string
                      description: 入金使用的支付网络。
                      x-onerway-constraints:
                        - kind: range
                          max: 64
                          unit: 字符
                    bankTransferReference:
                      type: string
                      description: 银行转账参考号。
                      x-onerway-constraints:
                        - kind: range
                          max: 256
                          unit: 字符
                    preMatchUserId:
                      type: integer
                      description: 入金匹配前识别的用户 ID。
                  description: 入金详情。
                  x-onerway-signature-participation: included
            examples:
              incoming_deposit:
                summary: 入金通知回调报文
                value:
                  request_id: "2098358001248374784"
                  event_type: EMFIN.RECHARGE
                  created_at: 2026-09-11T18:28:27+08:00
                  version: v1.0
                  data:
                    rechargeId: 2098358000329
                    merchantNo: 800***
                    remark: example_bank_remark_001
                    currencyCode: GBP
                    transAmount: 50.16
                    isReturn: "false"
                    createTime: 2026-09-11 18:28:24
                    completeTime: 2026-09-11 18:28:27
                    remitAccountIban: "****7834"
                    remitterName: SAN ZHANG
                    remittanceBank: HSBC UK BANK PLC
                    payeeName: SAN ZHANG
                    mainAccountNo: GB**CLRB**********7833
                    bankSerialNo: example_bank_serial_001
                    sortCode: "040893"
                    payerCountry: GB
                    paymentRail: Faster Payments
                    bankTransferReference: example_transfer_reference_001
                    preMatchUserId: 12345678
                x-onerway-headers:
                  Content-Type: application/json;charset=UTF-8
                  x-timestamp: "1789122507"
                  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: 成功应答正文
                  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 验证时间戳请求头。
```
