POST Create Cashier Withdrawal¶
Endpoint¶
POST /cashier/withdrawal
Command¶
CreateCashierWithdrawal
Authorization¶
Requires SESSION_CUSTOMER.
Description¶
Creates a withdrawal transaction using a brand-configured manual withdrawal
method. The server rechecks method eligibility and amount limits, validates
details against the method form_schema, and stores a snapshot of the method
and submitted details. The transaction is created with type = 1, source = 1,
and status = 9 (manual_review).
The account is not debited by this endpoint. A manager must process the
transaction in CRM with MngProcessManualCashierTransaction.
The endpoint does not accept owner_manager_id. The Owner of the created
transaction is the manager the customer is assigned to at that moment, and it is
returned in the transaction object. Only the manual BackOffice commands let a
manager choose it explicitly; see
Transaction Ownership.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
login |
int | Yes | Trading account login owned by the authenticated customer |
amount |
double | Yes | Positive withdrawal amount |
currency |
string | Yes | Must match account currency |
provider_config_id |
int | Yes | Eligible withdrawal config returned by GET /cashier/methods?type=withdrawal |
details |
object | Yes | Withdrawal details matching the selected method's form_schema |
idempotency_key |
string | No | Customer-scoped idempotency key |
comment |
string | No | Customer comment |
metadata_json |
string | No | Additional metadata JSON string |
Request Example¶
POST /cashier/withdrawal
Authorization: <CUSTOMER_JWT>
Content-Type: application/json
{
"login": 2000009,
"amount": 50.0,
"currency": "EUR",
"provider_config_id": 12,
"details": {
"asset": "USDT",
"network": "TRC20",
"address": "TXabc1234567890",
"memo": ""
},
"idempotency_key": "wd-001",
"comment": "Bank withdrawal"
}
Response¶
Returns the complete transaction. provider_config_id, provider, method,
and the metadata_json snapshot identify the selected withdrawal method and
submitted details.
{
"transaction": {
"id": 481,
"customer_id": 95,
"login": 2000009,
"type": 1,
"provider": "manual",
"method": "crypto",
"provider_config_id": 12,
"provider_payment_id": "",
"amount": 50.0,
"currency": "EUR",
"account_currency": "EUR",
"converted_amount": 50.0,
"conversion_rate": 1.0,
"status": 9,
"failure_reason": "",
"idempotency_key": "wd-001",
"comment": "Crypto withdrawal",
"metadata_json": "{\"provider_config_id\":12,\"method\":\"crypto\",\"display_name\":\"Cryptocurrency\",\"details\":{\"asset\":\"USDT\",\"network\":\"TRC20\",\"address\":\"TXabc1234567890\",\"memo\":\"\"}}",
"source": 1,
"approved_by": 0,
"approved_time": 0,
"processed_by": 0,
"processed_time": 0,
"reject_reason": "",
"created_time": 1790580000,
"updated_time": 1790580000
}
}
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Invalid request |
400 |
CURRENCY_CONVERSION_REQUIRED |
Currency does not match account currency |
400 |
INVALID_WITHDRAWAL_DETAILS |
details does not match form_schema |
400 |
INVALID_METADATA |
metadata_json is not a JSON object |
400 |
WITHDRAWAL_PROVIDER_NOT_SUPPORTED |
Selected method requires an automatic payout module, which is not implemented yet |
403 |
PERMISSION_DENIED |
Invalid customer session or account ownership |
403 |
WITHDRAWAL_NOT_ALLOWED |
Withdrawals are disabled for this customer |
403 |
PAYMENT_METHOD_NOT_AVAILABLE |
Config is disabled or does not match brand, direction, country, currency, limits, or override rules |