Skip to content

ConvertBonusToBalance

Converts bonus into balance by creating two finance transactions atomically. Requires access_backoffice, manager permission set_bonuses, and group policy BONUS_USAGE_ALLOW_CONVERSION.

Parameters

Field Type Required Description
login integer Yes Account login.
amount number Yes Positive amount to convert.
gw_uuid string Yes Unique idempotency and correlation key.
comment string No Comment, up to 256 characters.
{"command":"ConvertBonusToBalance","data":{"login":2000066,"amount":250,"comment":"Turnover condition met","gw_uuid":"bonus-conversion-2000066-1"},"extID":"bonus-convert-1"}

Response data

{"accepted":true,"login":2000066,"amount":250.0,"bonus_order":1246800,"balance_order":1246801,"gw_uuid":"bonus-conversion-2000066-1"}

The server creates an OP_BONUS_OUT leg and an OP_BALANCE_IN leg with TR_REASON_BONUS_CONVERSION. Both use the same gw_uuid; the balance leg references the bonus leg through parent_order. Reusing the correlation key is rejected.

Conversion legs are immutable through ordinary update and delete commands. The operation is rejected when the requested amount exceeds available bonus or violates policy and margin invariants.