Handling notifications
Configure real-time alerts for transaction events and handle error notifications through Slack. Stay updated with critical information.
Overview
Blnk uses webhooks to send you real-time notifications about crucial transaction events happening in your ledger. Our webhook follows this structure:
Field | Description | Type |
---|---|---|
event | Indicates the type of event, e.g., transaction.applied . | String |
data | Contains the request payload, detailing the relevant information. | Object |
Supported events
Here are a list of supported events:
Ledgers
Event name | Description |
---|---|
ledger.created | When a ledger is created. |
Balances
Event name | Description |
---|---|
balance.created | When a balance is created. |
Balance monitors
Event name | Description |
---|---|
balance.monitor | When a balance monitor is triggered due its conditions being met. |
Transactions
Event name | Description |
---|---|
transaction.applied | When a transaction is applied or committed. |
transaction.inflight | When a transaction is inflight |
transaction.void | When an inflight transaction is voided. |
transaction.scheduled | When a transaction is successfully scheduled. |
transaction.rejected | When a transaction is rejected |
Bulk transactions
Event name | Description |
---|---|
bulk_transaction.applied | When all items in a bulk transactions have been applied. |
bulk_transaction.inflight | When all items in a bulk transactions are successfully inflight. |
bulk_transaction.failed | When a bulk transaction fails. |
Identities
Event name | Description |
---|---|
identity.created | When an identity is created. |
Handling error notifications
In addition to transaction events, Blnk also allows you to send error notifications to Slack via a specified webhook provided by your Slack workspace. This is very useful for monitoring and quickly addressing issues that may arise during transaction processing.
To learn how to get your Slack webhook URL, go to: Slack API: Sending messages using incoming webhooks.
Configuring notifications in Blnk
To set up how you receive notifications from Blnk, you need to update your blnk.json
configuration file. This file allows you to specify the webhook URLs that Blnk sends notifications to — both for your application and Slack.
If you do not have a blnk.json
file, please create a new json
file — it contains essential settings for running your Blnk server.
Next, copy & paste the configuration JSON into it.
Update the notification
object as follows:
slack
:webhook_url
: The webhook URL provided by your Slack workspace.
webhook
:url
: Your application’s webhook URL where Blnk sends transaction event notifications to.headers
: Optional headers that you may need to include in the notification request to authenticate the message. This can include authentication tokens or content type specifications.
Below is an example of a notifications configuration:
Need help?
We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.
To ask questions or discuss issues, please contact us or join our Discord community.
Love building with Blnk? We’d love to hear your feedback. Tell us here.