Cregis Developer Docs
WEBHOOK

Payment Exception Webhook

A server-initiated callback. Implement a receiving endpoint in your service.

When a payment exception status changes, Cregis sends an HTTP POST application/json notification to your configured payment-exception callback URL. Verify the callback signature first, then return plain text success to acknowledge receipt; any other response is treated as a failure.

For failed callbacks, log in to Cregis and retry from “Payment Engine Projects > Select Project > Callback Error”. See Exception Callback Handling for details.

Callback events

event_name is always payment_exception.

event_typeDescription
initiatedPayment exception received
transferringTransfer in progress
transfer_successfulTransfer completed
transfer_failedTransfer failed

payment_history is an array of record objects for all statuses, sorted by block_time in ascending order. initiated omits transfer_fee and transfer_history. For in-progress and failed transfers, transfer_history contains addresses and amount; a completed transfer also includes block_time and tx_id.

Request

Callback Payload

application/json
  • pidinteger<int64>

    Project ID.

  • signstring

    Callback signature. Verify the signature before processing and acknowledging the callback.

  • noncestring

    6-character random string.

  • timestampinteger<int64>

    Timestamp.

  • event_namestring
    enum: "payment_exception"

    Event name.

  • event_typestring
    enum: "initiated", "transferring", "transfer_successful", "transfer_failed"

    Payment exception event type.

    • initiatedPayment exception received
    • transferringTransfer in progress
    • transfer_successfulTransfer completed
    • transfer_failedTransfer failed
  • dataobject

    Webhook data.

    • payment_exception_data
      • token_symbolstring

        Token symbol of the payment exception.

      • blockchainstring

        Blockchain the payment exception was made on.

      • token_namestring

        Token name (e.g. USDT-TRC20).

      • typestring
        enum: "aml", "other"

        Payment exception type: aml (AML reason) or other (other reasons).

      • payment_historyarray<object>

        Array of payment exception record objects, sorted by block_time in ascending order. All event statuses use this structure.

        Array items · object

        • idinteger<int64>

          Payment exception ID.

        • block_timeinteger<int64>

          On-chain receive time (UTC).

        • from_addressstring

          Payment exception source address.

        • to_addressstring

          Payment exception destination address.

        • initial_amountstring

          Received amount.

        • tx_idstring

          Receive tx hash.

        • created_timeinteger<int64>

          Payment exception record creation time.

        • transfer_feestring

          Transfer fee; omitted from the initiated example.

        • statusstring
          enum: "initiated", "transferring", "transfer_successful", "transfer_failed"

          Payment exception record status: initiated (received, not transferred yet), transferring (transfer in progress), transfer_successful (transfer confirmed), or transfer_failed (transfer failed).

        • transfer_history
          • block_timeinteger<int64>

            On-chain transfer time (UTC).

          • from_addressstring

            Transfer source address.

          • to_addressstring

            Transfer destination address (merchant wallet address).

          • amountstring

            Transfer amount.

          • tx_idstring

            Transfer tx hash.

Responses

200Return plain text success to acknowledge the callback.
text/plain
string
enum: "success"