Cregis Developer Docs
WEBHOOK

Deposit 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 Generate Address API. This callback is initiated by Cregis and sent to the business side. There are two mutually exclusive callback outcomes, determined by the status value. A single transaction generates only one callback:

statusDescription
1Deposit transaction successful callback
2Deposit transaction failed callback

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.

  • addressstring

    Address.

  • amountstring

    Amount.

  • statusstring
    enum: "1", "2"

    Status.

  • txidstring

    Transaction hash.

  • noncestring

    6-character random string.

  • timestampinteger<int64>

    Timestamp.

  • signstring

    Signature.

  • block_heightstring

    Block height.

  • block_timestring

    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