Ledger balances
Create balance monitor
Create a balance monitor with the TypeScript SDK.
POST
Create balance monitor
Use
blnk.BalanceMonitor.create to set up balance monitoring on an existing balance.
blnk.BalanceMonitor.create
| Field | Description |
|---|---|
balance_id | Balance to monitor. |
condition | Threshold rule with field, operator, value, and precision. |
condition.field | Balance field to watch (for example credit_balance, debit_balance, balance). |
condition.operator | Comparison operator: >, <, or =. |
condition.value | Threshold amount. |
condition.precision | Currency precision (for example 100 for cents). |
call_back_url | Webhook URL when the condition is met. |
description | Optional description for the monitor. |
Response shape
201 Created
| Field | Description |
|---|---|
monitor_id | Unique ID for the monitor. |
balance_id | Balance being monitored. |
condition | Threshold rule you passed in the request. |
call_back_url | Webhook URL for notifications. |
description | Description for the monitor. |
created_at | Date and time when the monitor was created. |
Related docs
Balance monitoring
Conditions and webhook behavior.
Create balance monitor
HTTP request and response schema.