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
1
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).2
Create the monitor
Call
POST /balance-monitors with your condition:You can include
meta_data in the request to attach custom data to the monitor.3
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
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: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.