- UTXO-based assets: A notification of an incoming transaction is created when the transaction is present in the mempool.
- Account-based assets: A notification of an incoming transaction is created when the transaction is mined.
Webhook examples - best practice
If you’ve installed a webhook server inside your environment and configured it in your workspace, following the Webhooks guide , you’ll now receive push notifications for transactions created or other workspace notifications. On your webhook server, you can trigger additional behaviors with the code you place for the response to the webhook event post message your server got, basing it on the Transaction ID. Your webhook server notification includes the primary status of the transaction and its sub-status. See a full list of the transaction statuses and sub-statuses.Basic example
The example below shows how theapp.post function, which is a part of our basic example for a Webhooks server, responds to the Console with the transaction ID, status, and sub-status details received inside the Webhook.
Act on transaction success example
The example below shows how theapp.post function responds with a call to an example backend function to report the failure and provide the details around it.
Act on transaction failure example
See examples of transaction failures and how to handle them.Non-production monitoring example
If you have not yet configured a webhook and would like to monitor transaction status on your non-production environment, you can use the example below which regularly calls the Fireblocks Find a specific transaction endpoint to get the status. The example below calls thegetTransactionById function with the transaction ID as its parameter (txId) and continuously polls for status change in a fixed interval, returning an error if it is not finalized with the completed status.
Rate limits with monitoring:Rate limits can affect monitoring. Use webhooks whenever possible to minimize the number of API calls made against your rate limits. More information at Working with Rate Limits .This method also allows you to scale monitoring for more transactions as you build your business, without affecting your ability to actually process more transactions.