Cregis Developer Docs
WEBHOOK

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:

statusDescription
2Signature rejected
4Approval rejected
6Transaction successful
7Transaction 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/json
  • pidinteger<int64>

    Project ID.

  • cidinteger<int64>

    System serial number.

  • chain_idstring

    Main chain identifier.

  • token_idstring

    Token ID.

  • currencystring

    Currency identifier.

  • from_addressstring

    Sender address.

  • to_addressstring

    Recipient address.

  • amountstring

    Payout amount.

  • third_party_idstring

    Caller business ID.

  • statusinteger<int32>
    enum: 2, 4, 6, 7

    Status.

  • noncestring

    6-character random string.

  • timestampinteger<int64>

    Timestamp.

  • signstring

    Signature.

  • remarkstring

    Remark. Maximum 256 characters.

  • txidstring

    Transaction hash.

  • block_heightstring

    Block height.

  • block_timeinteger<int64>

    Block time.

  • memostring

    On-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/plain
string