Subscribe to events using webhooks
An event is a notification about any update in a process. In Liminal, events occur when there is an update on the transactions. These real-time updates are notified to you, as a Virtual Asset Service Provider (VASP). This ensures that you are always informed about the confirmation and completion of your customers’ transactions.
The following flowchart illustrates the flow of the webhook and the actions you can take based on them.
The above flowchart is described as in the following steps:
- Your customer (User) initiates a transaction on a blockchain.
- Liminal receives the block confirmation on the transaction.
- Liminal sends a webhook request to your webhook URL.
- You call the Retrieve a transaction status API to check the status of the transaction.
- You validate the API response with the webhook request data.
- If confirmed, you credit your customer’s account.
Note: These events may occur more than one time for the same transactions. Even when the same event occurs multiple times, the data in the event remains the same. You can validate the payload received in the webhook request using the Retrieve a transaction status API based on the transaction hash to avoid duplicate entries in the system. The webhook endpoint should implement it's own strategy to handle duplicates, this can be done by adding a uniqueness check based on transaction hash and destination address. Alternatively, the webhook payload also includes a unique id per transaction, which can be used.
Transaction events
In Liminal, webhooks are designed to provide real-time updates about two primary types of events – Send and Receive.
Event identification | Description |
---|---|
Send | When a transaction is confirmed on the blockchain after a specific number of block confirmation occur for a protocol, for outgoing transactions from Vaults, a 'Send' event is triggered. The associated request notifies your webhook upon the confirmation of the transaction, providing all the necessary details such as transaction ID, the amount sent, the sender's and receiver's wallet details, etc. For more details, see Send webhook requests. |
Receive | When a transaction is completed and the funds are received in the designated account, a 'Receive' event occurs. This event confirms the successful completion of the transaction. The associated request notifies your webhook with the confirmation of the transaction completion, along with the relevant transaction details. Please note that this event only gets triggered after sufficient confirmations are received on blockchain as shown in the block confirmation table. For more details, see Receive webhook requests. |
Block confirmation
Block confirmations play an important role in the security and validity of transactions on the blockchain. In the context of deposits and withdrawals in Liminal, a specific number of block confirmations are required to ensure the validity and confirmation of the transactions. This additional confirmation provides an extra layer of security, reducing the risk of fraudulent transactions.
The following table provides information about the blockchain based block confirmation thresholds for testing and production environments:
Chain | Block confirmations (testing environment) | Block confirmations (production environment) |
---|---|---|
Ethereum | 5 | 22 |
Binance Smart Chain | NA | 21 |
Polygon | 20 | 151 |
Energy Web Chain | NA | 21 |
Arbitrum | NA | 21 |
Avalanche | NA | 21 |
Optimism | NA | 21 |
Fantom | NA | 21 |
Klaytn | NA | 21 |
Flare | NA | 21 |
ZKEVM | NA | 9 |
Telos | NA | 21 |
Bahamut | 2 | 2 |
Playa3ull | 31 | 31 |
Bitcoin | 1 | 2 |
Doge | 20 | 11 |
Bitcoin Cash | 1 | 10 |
BNB Beacon Chain | NA | 60 |
Litecoin | 1 | 5 |
Bitcoin SV | NA | 11 |
Tron | 10 | 31 |
Solana | 10 | 31 |
Cardano | 10 | 11 |
Near | 31 | 31 |
Algorand | 31 | 31 |
EthereumPow | NA | 21 |
Gnosis | NA | 21 |
Xinfin | 10 | 21 |
Tezos | 30 | NA |
Base ETH | NA | 50 |
Ripple, Stellar, and Cosmos networks don't rely on traditional block confirmations. Instead, they use their own consensus protocols where balances and transactions are synced at set intervals.