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 the payment-exception callback URL configured in the Cregis client. cregis_id and merchant_order_id are included only when type = aml; type = other omits the linked order fields.

Verify the signature, then respond with the plain-text string success to acknowledge receipt. Other response content is treated as a failed callback. Retry failed callbacks from Cregis App > WaaS Projects > Select Project > Callback Error. See Exception Callback Handling.

Callback events

event_name is always waasom_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.

Request

Callback Payload

application/json
  • pidinteger<int64>

    Project ID — found under the project's settings.

  • signstring

    Digital signature — merchants MUST verify it to authenticate the callback.

  • noncestring

    6-character random string.

  • timestampinteger<int64>

    13-digit Unix timestamp (ms).

  • event_namestring
    enum: "waasom_payment_exception"

    Callback 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
  • data
    • cregis_idinteger<int64>

      Cregis order number; present only for type = aml, and absent for type = other.

    • merchant_order_idstring

      Merchant order number; present only for type = aml, and absent for type = other.

    • payment_exception_data
      • token_symbolstring

        Token symbol.

      • blockchainstring

        Blockchain name.

      • token_namestring

        Full token name including chain.

      • typestring
        enum: "aml", "other"

        aml: AML reason, linked to an order; other: other reasons, with no linked order.

      • 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>

          Exception payment record ID.

        • block_timeinteger<int64>

          On-chain receive time (UTC), as a 13-digit Unix timestamp in milliseconds.

        • from_addressstring

          Sender address.

        • to_addressstring

          Recipient address.

        • initial_amountstring

          Initial payment amount.

        • tx_idstring

          On-chain transaction ID.

        • created_timeinteger<int64>

          Record creation time (13-digit Unix timestamp).

        • transfer_feestring

          Payment-exception transfer fee; absent from the initiated example.

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

          Payment exception record status.

          • initiatedPayment exception received, not transferred yet.
          • transferringTransfer in progress.
          • transfer_successfulTransfer completed.
          • transfer_failedTransfer failed.
        • transfer_history
          • block_timeinteger<int64>

            On-chain transfer time (UTC), as a 13-digit Unix timestamp in milliseconds.

          • from_addressstring

            Transfer sender address.

          • to_addressstring

            Transfer recipient address.

          • amountstring

            Transfer amount.

          • tx_idstring

            On-chain transfer transaction ID.

Responses

200Respond with plain-text success to acknowledge the callback.
text/plain
string
enum: "success"