Add balance
BalanceIn¶
Description: Adds a deposit entry to a user account. Positive amount are treated as deposits, and negative values as withdrawals.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| login | int | Yes | User login ID to which the balance operation applies |
| amount | double | Yes | Amount to deposit (positive) or withdraw (negative) |
| comment | string | No | Optional comment (default: "Finance") |
| order | int | No | Optional custom order ID to track this balance operation |
Request Example¶
{
"login": 123456,
"amount": 1000.00,
"comment": "Initial deposit"
}
Withdrawal Example¶
{
"login": 123456,
"amount": -500.00,
"comment": "Withdrawal via request #42"
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
| data | string | Returns "OK" if successful |
Response Example¶
{
"data": "OK"
}
⚠️ If the operation fails, an error response is returned:
{ "error": "ADD_BALANCE_ERROR", "message": "Invalid login or insufficient permissions" }