Skip to main content
Balance monitors let you keep track of balances in your Blnk Ledger. This is useful for scenarios where balances should meet specific thresholds. You can monitor all 3 sub-balances of a ledger balance - credit balance (credit_balance), debit balance (debit_balance) and total balance (balance).

Why monitor balances?

  1. Fraud detection: Unusual balance changes can be an early indication of fraudulent activities. Monitoring can trigger alerts for suspicious transactions and ensure timely intervention.
  2. Regulatory compliance: Many financial regulations require institutions to maintain specific balance thresholds. Real-time balance monitoring makes it easy to comply with these regulations.
  3. 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.
  4. 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

Call GET /balance-monitors/{monitor_id} to retrieve one monitor by ID.
Response

List all balance monitors

Call GET /balance-monitors to retrieve every monitor in your ledger.
Response

List monitors for a balance

Call GET /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

Call PUT /balance-monitors/{monitor_id} and provide the updated conditions in the request body.
Response

Delete a balance monitor

Call DELETE /balance-monitors/{monitor_id} to remove a monitor.
200 OK
A subsequent GET /balance-monitors/{monitor_id} returns 404 with BAL_MONITOR_NOT_FOUND. See Delete balance monitor for the full reference.

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.