credit_balance), debit balance (debit_balance) and total balance (balance).
Why monitor balances?
- Fraud detection: Unusual balance changes can be an early indication of fraudulent activities. Monitoring can trigger alerts for suspicious transactions and ensure timely intervention.
- Regulatory compliance: Many financial regulations require institutions to maintain specific balance thresholds. Real-time balance monitoring makes it easy to comply with these regulations.
- Customer notifications: Customers can be notified in real-time if their balance crosses a specific threshold. It can also be used for segmenting your customers in your application.
- Operational efficiency: Instantly knowing when a balance reaches a certain threshold can trigger automatic actions, such as transferring funds between accounts or purchasing assets.
Set up balance monitors
Define your condition
Choose the balance to watch, the sub-balance field, the comparison operator, and the threshold value. Use the same
precision you use when recording transactions for that currency.In this example, you want to get notified when debit_balance is greater than 1,000.00 (value: 100000, precision: 100).Create the monitor
Call
POST /balance-monitors with your condition:| Field | Description |
|---|---|
balance_id | Unique identifier of the balance to be monitored. |
condition | Object representing the condition to be satisfied. |
field | Sub-balance to monitor: debit_balance, credit_balance, or balance. |
operator | Comparison operator. See Supported operators. |
value | Threshold the field is compared against. |
precision | Precision applied to value. Must match how you record transactions for that currency. |
description | Label for the monitor. Empty when omitted. |
You can include
meta_data in the request to attach custom data to the monitor.Confirm creation
Blnk stores the monitor and returns a unique
monitor_id. When the condition is met, you receive a balance.monitor webhook event.Response
| Field | Description | Type |
|---|---|---|
monitor_id | Unique identifier for your balance monitor. | string |
created_at | Date and time of creation. | string |
Save the returned
monitor_id - you need it to view, update, or delete the monitor later.Supported operators
This is a list of all supported operators by the Balance monitor:| Operators | Symbol | Description |
|---|---|---|
| Greater than | > | Checks if the specified balance in field is greater than value |
| Less than | < | Checks if the specified balance in field is less than value |
| Equal to | = | Checks if the specified balance in field is exactly equal to value |
| Not equal to | != | Checks if the specified balance in field is not equal to value |
| Greater than or equal to | >= | Checks if the specified balance in field is greater than or equal to value |
| Less than or equal to | <= | Checks if the specified balance in field is less than or equal to value |
View a balance monitor
CallGET /balance-monitors/{monitor_id} to retrieve one monitor by ID.
Response
List all balance monitors
CallGET /balance-monitors to retrieve every monitor in your ledger.
Response
List monitors for a balance
CallGET /balance-monitors/balances/{balance_id} to retrieve every monitor attached to a specific balance. The path parameter is the balance ID, not a monitor ID.
Response
Update a balance monitor
CallPUT /balance-monitors/{monitor_id} and provide the updated conditions in the request body.
Response
Delete a balance monitor
CallDELETE /balance-monitors/{monitor_id} to remove a monitor.
200 OK
GET /balance-monitors/{monitor_id} returns 404 with BAL_MONITOR_NOT_FOUND. See Delete balance monitor for the full reference.