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 yourblnk.json configuration file. This file allows you to specify the webhook URLs that Blnk sends notifications to — both for your application and Slack.
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.
blnk.json