Sub-address Withdrawal Notification
A server-initiated callback. Implement a receiving endpoint in your service.
The callback URL is provided by the initiator of the corresponding business request. See the callback_url parameter in the sub-address withdrawal API. This callback is initiated by Cregis and sent to the business side. There are four mutually exclusive callback outcomes, determined by the status value. A single transaction generates only one callback:
| status | Description |
|---|---|
| 2 | Signature rejected |
| 4 | Approval rejected |
| 6 | Transaction successful |
| 7 | Transaction failed |
After Cregis sends the callback, receiving a response body equal to the success string means the callback succeeded; otherwise, the callback failed. Failed callbacks can be pushed again. Log in to the Cregis client, select the corresponding project in the project menu, and push again from the callback records menu.
Different business types have different callback payloads. We strongly recommend using separate endpoints for different callback types to keep business logic clear.
Request
Callback Payload
application/jsonpidinteger<int64>Project ID.
cidinteger<int64>System serial number.
chain_idstringMain chain identifier.
token_idstringToken ID.
currencystringCurrency identifier.
from_addressstringSender address.
to_addressstringRecipient address.
amountstringPayout amount.
third_party_idstringCaller business ID.
statusinteger<int32>enum: 2, 4, 6, 7Status.
noncestring6-character random string.
timestampinteger<int64>Timestamp.
signstringSignature.
remarkstringRemark. Maximum 256 characters.
txidstringTransaction hash.
block_heightstringBlock height.
block_timeinteger<int64>Block time.
memostringOn-chain memo/tag information. Supported only by TON and XRP.
Responses
200Your server must return HTTP 200 and a response body strictly equal to plain text `success` (`text/plain`).text/plainstring