MngCreateFinanceRequest¶
Creates a finance request in TS_FINANCE_OPEN_PENDING state.
The request is stored in trade cache and database, but it does not change balance, credit, equity, or margin until it is approved.
Access Control¶
Requires set_finance for manager/CRM sessions. The target account and linked customer, when present, must match the manager brand and desks scope loaded from the cached manager record. Token payload is used only for manager id and session type.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
login |
int | Yes | Account login |
cmd |
int | Yes | OP_BALANCE_IN, OP_BALANCE_OUT, OP_CREDIT_IN, OP_CREDIT_OUT, OP_BONUS_IN, or OP_BONUS_OUT |
amount |
double | Yes | Positive for *_IN, negative for *_OUT |
comment |
string | No | Request comment |
open_time |
time_t | No | Request creation time. Current server time is used when omitted |
reason |
int | No | Trade reason. Defaults to TR_REASON_API |
gw_order |
string | No | PSP/gateway order id |
gw_source |
string | No | PSP/gateway source |
gw_uuid |
string | No | PSP/gateway UUID |
api_data |
string | No | Optional external payload |
Request¶
{
"command": "MngCreateFinanceRequest",
"extID": "1",
"data": {
"login": 100001,
"cmd": 6,
"amount": 250,
"comment": "PSP deposit request",
"gw_source": "stripe",
"gw_uuid": "pay_123"
}
}
Response Data¶
{
"accepted": true,
"order": 1242300,
"state": 17,
"login": 100001,
"cmd": 6,
"amount": 250
}