BonusIn¶
Creates a positive bonus transaction or updates an existing OP_BONUS_IN transaction. Requires access_backoffice and manager permission set_bonuses.
Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
login |
integer | Yes | Account login. |
amount |
number | Yes | New positive transaction amount. |
comment |
string | Yes | Comment, up to 256 characters. |
order |
integer | No | Existing bonus order to update. Omit to create. |
open_time |
integer | No | Replacement open timestamp. |
close_time |
integer | No | Replacement close timestamp. |
gw_uuid |
string | No | External correlation identifier. |
Create¶
{"command":"BonusIn","data":{"login":2000066,"amount":2000,"comment":"Welcome bonus"},"extID":"bonus-create-1"}
Update¶
{"command":"BonusIn","data":{"login":2000066,"order":1246907,"amount":1000,"comment":"bonus<2>","open_time":1785408027,"close_time":1785408027},"extID":"bonus-update-1"}
When order is present, the server reads the previously applied amount from that transaction and applies only the delta. Client-side prev is not required and is ignored. The stored transaction must belong to the same login and must be OP_BONUS_IN.
Response data¶
{"accepted":true,"order":1246907,"state":11,"login":2000066,"cmd":14,"amount":1000.0}
New transactions return TS_FINANCE_OPEN_REQUEST (10); updates return TS_FINANCE_UPDATE_REQUEST (11). A supplied order that does not exist returns RET_NOT_FOUND and never creates another bonus.