cashier.withdrawal.created¶
Direction: server → modules. External Moleculer event name: cashier.withdrawal.created.
Source and occurrence¶
C++ payload: CashierTransactionRecord. Internal EventBus name: cashier.push. Event
code: EV_RECORD_ADD (0).
The event is emitted by CashierManager::AddTransaction once a new withdrawal
transaction has been written to the Cashier store and added to the runtime cache. It is
raised on every creation path; no workflow rule is involved:
| Command | Who creates | status |
source |
|---|---|---|---|
CreateCashierWithdrawal |
Customer | 9, manual review |
1, manual |
MngCreateManualCashierWithdrawal |
Manager | 0, created |
1, manual |
A rejected creation — invalid data, withdrawal not allowed, duplicate
idempotency_key, storage failure — publishes nothing. The event carries the
transaction as created: with process_now=1 the manager command processes the
withdrawal afterwards, and a successful processing later publishes
cashier.withdrawal.approved if the brand has the
workflow rule for it. A creation does not debit or reserve the account.
This is asynchronous fire-and-forget publication. It does not confirm delivery or processing by a module.
This event is not the workflow trigger withdrawal.created: that trigger fires on the
balance operation, when the withdrawal is applied, not when it is requested.
JSON payload¶
{
"event_id": "5c0f6e2b9d8a4f3e8b1a7c2d4e6f8091",
"event_code": 0,
"occurred_at": 1789639110,
"schema_version": 2,
"brand": "ion4",
"transaction_id": 112,
"customer_id": 80,
"login": 7777853,
"type": 1,
"provider": "manual",
"method": "crypto",
"provider_config_id": 4,
"provider_payment_id": "",
"amount": 150.0,
"currency": "USD",
"account_currency": "USD",
"converted_amount": 150.0,
"conversion_rate": 1.0,
"status": 9,
"source": 1,
"comment": "Please send to my USDT wallet",
"created_time": 1789639110
}
| Field | Type | Meaning |
|---|---|---|
brand |
string | Brand resolved from the transaction account during formatting; empty if the account lookup fails |
transaction_id |
integer | Cashier transaction identifier |
customer_id |
integer | Related customer identifier |
login |
integer | Trading account login |
type |
integer | 1, withdrawal |
provider |
string | Provider code of the selected method; manual for a manager-created request |
method |
string | Payment method; empty if a manager did not pass one |
provider_config_id |
integer | Selected Cashier provider configuration; 0 for a manager-created request |
provider_payment_id |
string | Provider-side payment identifier, if a manager passed one |
amount |
number | Requested amount in currency |
currency |
string | Requested currency |
account_currency |
string | Trading account currency |
converted_amount |
number | Amount in account currency |
conversion_rate |
number | Conversion rate; 1.0, conversion is not supported for withdrawals |
status |
integer | Initial status, see the table above |
source |
integer | 1, manual source |
comment |
string | Request comment |
created_time |
integer | Creation time in Unix seconds |
occurred_at equals created_time. Recipient details, payment instructions
(metadata_json) and the idempotency key are not published. The event has no customer
email or name: a consumer resolves them by customer_id / login.
Mailer and SMS triggers¶
A trigger with "event": "cashier.withdrawal.created" fires on every request. To limit it
to requests submitted by customers, add a condition:
{ "match": { "status": "9" } }
See shared outbound rules for metadata, queue limits and delivery guarantees.