> ## Documentation Index
> Fetch the complete documentation index at: https://waasapi.uuwallet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deposit Notification Callback

`NOTIFY_DEPOSITED` (type=1)

When a user deposits digital currency into their deposit address in WaaS, WaaS will notify you of the deposit details through this callback. The merchant needs to inform WaaS in the response whether this callback has been accepted.

### Request Parameters

The request sent by WaaS is an **RSA-encrypted Base64 string**. Merchants need to decrypt it using their public key to obtain the following business parameters:

<ResponseField name="Deposit Callback Request Parameters" type="object">
  <Expandable title="View Full Parameter List">
    <ResponseField name="txId" type="String" required="Yes" example="b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3">
      Blockchain transaction hash
    </ResponseField>

    <ResponseField name="chainName" type="String" required="Yes" example="TRON">
      Chain name, e.g., TRON, ETH, BSC...
    </ResponseField>

    <ResponseField name="symbol" type="String" required="Yes" example="TRX">
      Token symbol, e.g., USDT, USDC, PHT...
    </ResponseField>

    <ResponseField name="amount" type="String" required="Yes" example="2.500000000000">
      Deposit amount
    </ResponseField>

    <ResponseField name="fromAddress" type="String" required="Yes" example="TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK">
      Deposit source address (user's external address)
    </ResponseField>

    <ResponseField name="toAddress" type="String" required="Yes" example="TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP">
      Deposit target address (user's deposit address in WaaS)
    </ResponseField>

    <ResponseField name="riskLevelFrom" type="Integer" required="Yes" example="3">
      Source address risk score (0-100)
    </ResponseField>

    <ResponseField name="riskLevelTo" type="Integer" required="Yes" example="3">
      Target address risk score (0-100)
    </ResponseField>

    <ResponseField name="txIndex" type="Integer" required="Yes" example="">
      Transaction index
    </ResponseField>

    <ResponseField name="newAddress" type="string" required="Yes" example="TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP">
      New address, replaces toAddress when type=4
    </ResponseField>
  </Expandable>
</ResponseField>

### Response Parameters

After processing the callback, merchants need to return a JSON-formatted response body. The `data` field must return an **RSA-encrypted Base64 string** (encrypted using the public key provided by WaaS), while other fields are in plain text:

<ResponseField name="Deposit Callback Response Parameters" type="object">
  <Expandable title="View Full Parameter List">
    <ResponseField name="apiKey" type="String" required="Yes" example="88c47568-8d24-4983-9b4c-y1ec8b939e9b">
      Merchant's unique API identifier
    </ResponseField>

    <ResponseField name="data" type="String" required="Yes" example="i2H9eQf22gLnJoTeo1WbWVR6wmNv/Ryom5UjTPm4yM2aeuQUkpsErZAY...">
      Encrypted business data, e.g.: i2H9eQf22gLnJoTeo1WbWVR6wmNv (refer to example on right)

      Generated by encrypting the following raw business parameters:

      **type** (Integer) : Callback type

      **trackingId** (String) : Business event identifier

      **txId** (String) : Blockchain transaction hash

      **txIndex** (Integer) : Transaction sequence number in block

      **chainName** (String) : Blockchain name

      **symbol** (String) : Token symbol

      **amount** (Integer) : Deposit amount

      **fromAddress** (String) : Deposit source address

      **toAddress** (String) : Deposit target address

      **requestUUID** (String) : Unique request identifier, merchant must return the same requestUUID in response to help WaaS confirm

      **tenantUserId** (String) : User ID initiating deposit (in merchant system, not WaaS system)
    </ResponseField>

    <ResponseField name="errCode" type="Integer" required="Yes" example="0">
      Global processing status code:
      `0`=Success, non-`0`=Failure
    </ResponseField>

    <ResponseField name="message" type="String" required="Yes" example="">
      Error details (required when failed):

      * Can return empty string when successful
      * Must describe specific error when failed
    </ResponseField>
  </Expandable>
</ResponseField>

***

<RequestExample>
  ```mdx Raw Business Request Parameters Before Encryption theme={null}
  {
    "requestUUID": "fbd70fb4-c302-4228-bd61-6326e0539551",
    "chainName": "TRON",
    "symbol": "TRX",
    "amount": "2.500000000000",
    "business": 0,
    "toAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
    "fromAddress": "TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK",
    "riskLevelTo": 3,
    "riskLevelFrom": 3,
    "txId": "b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3",
    "tenantUserId": "2049",
    "type": 1,
    "txIndex": -1,
    "newAddress": "TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP",
    "trackingId": "6484"
  }
  ```
</RequestExample>

<ResponseExample>
  ```mdx Response Parameter Structure After Decryption theme={null}
  {
    "apiKey": "88c47568-8d24-4983-9b4c-y1ec8b939e9b",
    "data": "{\"type\":1,\"callBackId\":null,\"trackingId\":\"6484\",\"state\":null,\"txId\":\"b00a4aa3d6426f6409a83ae72a79de5b559a2c339ebc89b8b75427c2600978e3\",\"txIndex\":-1,\"chainName\":\"TRON\",\"symbol\":\"TRX\",\"amount\":\"2.500000000000\",\"fromAddress\":\"TGDHyoMpgDQj4DmoZdwJP2FSkSG4DEchnK\",\"toAddress\":\"TYLdkix4wqk1wLXbqbxrrY1oi1mHEM6uwP\",\"tenantType\":null,\"requestUUID\":\"fbd70fb4-c302-4228-bd61-6326e0539551\",\"tenantUserId\":\"2049\"}",
    "errCode": 0,
    "message": ""
  }
  ```
</ResponseExample>
