What is Webhook Callback?

Webhook callback is an event-driven communication mechanism where the WaaS platform actively sends notifications to merchant systems when specific events occur, used for asynchronously informing operation results or status changes. This mechanism allows merchants to learn blockchain operation results in real-time without actively polling for updates.

Core Features

Two-way Authentication Mechanism

Ensures callback source trustworthiness through API-Key mechanism

End-to-End Encryption

Notification content encrypted with RSA + Base64 encoding

Real-time Push

Notifications triggered immediately after event completion, no delay

Multi-scenario Coverage

Supports key scenarios like deposits, withdrawals, address changes

Callback Processing Flow

  1. Event Occurs: User initiates operations like deposit/withdrawal on WaaS platform
  2. WaaS Processing: Platform processes transaction and confirms blockchain status
  3. Notification Construction: WaaS generates notification data and performs security processing:
    • Encrypts with merchant’s private key using RSA
    • Converts encrypted result to Base64 format
  4. Callback Dispatch: WaaS sends HTTP POST request to merchant’s registered callback URL
  5. Merchant Processing:
    • Base64 decodes received data
    • RSA decrypts using merchant’s public key
    • Parses JSON-formatted business data
    • Performs corresponding processing based on business type
  6. Response Return: After processing, merchant returns encrypted response data

Example Scenarios

1. Deposit Notification Flow

1. User Deposit
2. Blockchain Confirmation
3. WaaS Detection
4. Merchant Processing

Key Steps:

  1. User deposits cryptocurrency to merchant address
  2. Transaction confirmed on blockchain network (typically requires multiple block confirmations)
  3. WaaS system detects successful transaction
  4. WaaS calls merchant callback URL, sends NOTIFY_DEPOSITED type notification
  5. Merchant verifies transaction and updates user account balance

2. Withdrawal Notification Flow (Without Secondary Confirmation)

1. Merchant Initiation
2. WaaS Processing
3. Blockchain Broadcast
4. Transaction Confirmation
5. Merchant Processing

Key Steps:

  1. Merchant system initiates withdrawal request via API
  2. WaaS processes withdrawal request and performs security review
  3. WaaS broadcasts withdrawal transaction to blockchain network
  4. Transaction confirmed by blockchain network
  5. WaaS sends NOTIFY_WITHDRAW notification for successful withdrawal
  6. Merchant receives notification and updates order status

3. Withdrawal Flow (With Secondary Confirmation)

1. Merchant System Initiates Withdrawal
2. WaaS Actively Calls Back Merchant
3. Merchant Responds With Details
4. Execute On-chain Withdrawal
5. Notify Merchant of Result

Key Steps:

  1. Merchant system initiates withdrawal request via API, carrying callbackId
  2. After receiving request, WaaS actively calls merchant’s callback URL (NOTIFY_REQUEST_WITHDRAW)
  3. After receiving request, WaaS returns success response, then actively calls merchant’s callback URL (enum type NOTIFY_REQUEST_WITHDRAW, carrying callbackId as parameter)
  4. When merchant’s callback interface is requested, responds to WaaS with withdrawal details based on callbackId, including: withdrawal amount, target address, currency, chain type…
  5. After receiving response, WaaS executes on-chain withdrawal
  6. After successful on-chain execution, WaaS calls back merchant again (NOTIFY_WITHDRAW) to notify withdrawal result