Monitor balances and get notified via webhook when they meet set conditions.
credit_balance
), debit balance (debit_balance
) and total balance (balance
).
Let’s get started ✨
What we’ll cover …
debit_balance
is above 100000.
Next, call the create-balance-monitor endpoint and provide the following request body:
Field | Description | Required? | Type |
---|---|---|---|
balance_id | Unique identifier of the balance to be monitored. | Yes | string |
condition | Object representing the condition to be satisfied. | Yes | |
field | Specific sub-balance to monitor. It can be debit_balance , credit_balance , or balance . | Yes | string |
operator | Indicates the comparison operation to be performed between the field and operator. See below → Supported operators. | Yes | string |
value | The value against which the field is compared. | Yes | int64 |
precision | Converts the value to lowest possible unit. Ensure that the precision specified is the same as the precision applied to the balance | Yes | int64 |
description | Description of your balance monitor. It is left empty if it’s not passed in the request. | No | string |
debit_balance
is greater than 100000.
meta_data
in your request if you need to add custom data to your balance monitor.monitor_id
. When the condition is met, you will get instantly notified via the balance.monitor
webhook event.
Field | Description | Type |
---|---|---|
monitor_id | Unique identifier for your balance monitor. | string |
created_at | Date and time of creation. | string |
Operators | Symbol | Description |
---|---|---|
Greater than | > | Checks if the specified balance in field is greater than value |
Less than | < | Checks if the specified balance in field is less than value |
Equal to | = | Checks if the specified balance in field is exactly equal to value |
Not equal to | != | Checks if the specified balance in field is not equal to value |
Greater than or equal to | >= | Checks if the specified balance in field is greater than or equal to value |
Less than or equal to | <= | Checks if the specified balance in field is less than or equal to value |
GET http://YOUR_BLNK_INSTANCE_URL/balance-monitors
will return a list of all balance monitors.