Skip to main content
POST
/
balance-monitors
{
  "balance_id": "bln_0987654321",
  "condition": {
    "field": "balance",
    "operator": "<",
    "value": 100.00,
    "precision": 100
  },
  "call_back_url": "https://api.example.com/webhooks/low-balance",
  "meta_data": {
    "alert_type": "low_balance",
    "notify_email": "alerts@example.com"
  }
}
{
  "monitor_id": "mon_1234567890",
  "balance_id": "bln_0987654321",
  "condition": {
    "field": "balance",
    "operator": "<",
    "value": 100,
    "precision": 100,
    "precise_value": "10000"
  },
  "description": "",
  "created_at": "2024-01-15T10:30:00Z"
}
Balance monitors allow you to set up automated alerts that trigger webhooks when specific balance conditions are met. This is useful for monitoring account balances, detecting low balance situations, or tracking when balances exceed certain thresholds.

Request Body

balance_id
string
required
The ID of the balance to monitor
condition
object
required
The alert condition that triggers the webhook when met
call_back_url
string
required
The webhook URL to call when the condition is met
meta_data
object
Additional metadata to associate with the monitor

Response

monitor_id
string
Unique identifier for the balance monitor
balance_id
string
The ID of the monitored balance
condition
object
The alert condition configuration
description
string
Optional description of the monitor
created_at
string
Timestamp when the monitor was created (ISO 8601 format)

Webhook Callback

When the monitor condition is met, Blnk sends a POST request to your call_back_url with the following payload:
Example Webhook Payload
{
  "event": "balance.monitor",
  "payload": {
    "monitor_id": "mon_1234567890",
    "balance_id": "bln_0987654321",
    "condition": {
      "field": "balance",
      "operator": "<",
      "value": 100.00,
      "precision": 100,
      "precise_value": "10000"
    },
    "description": "Low balance alert",
    "created_at": "2024-01-15T10:30:00Z"
  }
}
{
  "balance_id": "bln_0987654321",
  "condition": {
    "field": "balance",
    "operator": "<",
    "value": 100.00,
    "precision": 100
  },
  "call_back_url": "https://api.example.com/webhooks/low-balance",
  "meta_data": {
    "alert_type": "low_balance",
    "notify_email": "alerts@example.com"
  }
}
{
  "monitor_id": "mon_1234567890",
  "balance_id": "bln_0987654321",
  "condition": {
    "field": "balance",
    "operator": "<",
    "value": 100,
    "precision": 100,
    "precise_value": "10000"
  },
  "description": "",
  "created_at": "2024-01-15T10:30:00Z"
}

Use Cases

Low Balance Alerts

Monitor when account balances fall below a minimum threshold to prevent overdrafts or insufficient funds.

High Balance Notifications

Track when balances exceed certain amounts for compliance or operational purposes.

Zero Balance Detection

Detect when accounts reach exactly zero for automated account closure or archival.

Inflight Transaction Monitoring

Monitor pending transactions to manage liquidity and risk exposure.

Notes

  • The monitor checks conditions automatically after each transaction that affects the balance
  • Webhooks are sent asynchronously when conditions are met
  • The same balance can have multiple monitors with different conditions
  • Use precision to ensure accurate decimal handling (e.g., 100 for 2 decimal places, 1000 for 3 decimal places)
  • The precise_value in responses is the internal representation used for exact comparisons

Build docs developers (and LLMs) love