Ledger balances
Create balance monitor
Create a balance monitor with the Go SDK.
POST
Create balance monitor
Use
client.BalanceMonitor.Create to set up balance monitoring on an existing balance.
Call the method
client.BalanceMonitor.Create
| Field | Type | Description |
|---|---|---|
BalanceID | string | Balance to monitor. |
Condition | MonitorCondition | Threshold rule with Field, Operator, Value, and Precision. |
Condition.Field | string | Balance field to watch (for example credit_balance, debit_balance, balance). |
Condition.Operator | MonitorConditionOperators | Comparison operator: >, <, =, !=, >=, <=. |
Condition.Value | int64 | Threshold amount. |
Condition.Precision | int64 | Currency precision (for example 100 for cents). |
CallBackURL | string | Webhook URL when the condition is met. |
Description | string | Optional description for the monitor. |
Response
201 Created
| Field | Type | Description |
|---|---|---|
monitor_id | string | Unique ID for the monitor. |
balance_id | string | Balance being monitored. |
condition | object | Threshold rule you passed in the request. |
call_back_url | string | Webhook URL for notifications. |
description | string | Description for the monitor. |
created_at | string | Date and time when the monitor was created. |
Related docs
Balance monitoring
Conditions and webhook behavior.
Create balance monitor
HTTP request and response schema.