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

# Sub-address payout Notify

> Receive notifications for sub-address payout information

## Callback API

*The callback URL is provided in request body by the request initiator. For more details, see the `callback_url` parameter in the [Create withdrawal order](/api-reference/request-apis/withdrawal/withdrawal-create).*

This API allows `cregis` to initiate callback request to the original API caller.

The callback comes in four scenarios, which are determined by the `status` in the callback content. These scenarios are mutually exclusive and only trigger once:

| status | Description           |
| ------ | --------------------- |
| 2      | Signature Rejected    |
| 4      | Approval Rejected     |
| 6      | Transaction Succeeded |
| 7      | Transaction Failed    |

After initiating the callback, when the returned content is `success`, the callback is successful. Otherwise, the callback fails. If the callback fails, you can push it again, you can log into the `cregis` client, select the corresponding project in the menu, and re-push it from the callback record.

> Note: Different types of callbacks will have different content. It is strongly recommended to use different APIs for different types of callbacks to ensure clear and specific business logic.

#### Request Method

HTTP POST application/json

#### Request Parameters

| Name             | Type           | Description                                    |
| ---------------- | -------------- | ---------------------------------------------- |
| pid              | integer(int64) | WaaS Project ID                                |
| cid              | integer(int64) | Unique business ID generated by Cregis         |
| chain\_id        | string         | Blockchain ID                                  |
| token\_id        | string         | Token ID                                       |
| currency         | string         | Currency identifier                            |
| from\_address    | string         | Sender address                                 |
| to\_address      | string         | Recipient address                              |
| amount           | string         | Withdrawal amount                              |
| third\_party\_id | string         | Business reference ID generated by your system |
| remark           | string         | Transfer description (max 256 characters)      |
| status           | integer(int32) | Status                                         |
| txid             | string         | Transaction hash                               |
| block\_height    | string         | Block height                                   |
| block\_time      | integer(int64) | Block time                                     |
| memo             | string         | On-chain memo/tag (only for Ton, Xrp)          |
| nonce            | string         | 6-character random string                      |
| timestamp        | integer(int64) | Current timestamp                              |
| sign             | string         | Digital signature to prevent tampering         |

###### Example

```json theme={null}
{
  "pid": 1382528827416576,
  "cid": 1391751691788288,
  "from_address": "rhAZ673nG6fSXovPAkw3EcrhKyWwXducoi",
  "to_address": "rn5Jyu5J6PG64543KdGvS25rQBYFQo7GLc",
  "chain_id": "144",
  "token_id": "144",
  "currency": "XRP",
  "amount": "1.1",
  "third_party_id": "1e0fb3a0a9454ad8928d26b592e8b3c7",
  "remark": "payout",
  "memo": "123",
  "status": 6,
  "txid": "6dd05b0972075542219a3fcc116c58feaf9480f1f698cc46c4367ded83955cfd",
  "block_height": "34527604",
  "block_time": 1686814482000,
  "nonce": "ubqso3",
  "timestamp": 1687850657960,
  "sign": "f5be13fdd8c6f63951ca4427359457cb"
}
```
