Skip to content

Cashier Manager API

Cashier Manager API is the BackOffice layer for payment transactions, provider events, balance operation linkage, and payment provider configuration.

Cashier keeps runtime records in memory. Provider configuration and override writes are synchronized through the Cashier DB strand. Financial transactions, provider events, and balance-operation state are durably written before the corresponding in-memory state is updated, which protects ledger processing from duplicate submission after restart. The trading ledger stores its trade records separately. Cashier finalizes a balance operation only after the matching trade result is acknowledged as committed in the trading database; a trade visible in memory alone is not enough. The Cashier and trading databases do not share one atomic transaction. Payment provider modules are preloaded during CashierManager initialization: Cashier checks the SDK version, reads the module descriptor, stores the module catalog in memory, and unloads the preload handle. Brand-level provider configs activate available modules for a brand. Each enabled config creates a dedicated provider instance with that config; provider-specific credentials live in config_json. Customer-level overrides allow CRM to manually allow or deny methods from a customer card. An allow override does not bypass a provider config's country allowlist; country-restricted methods require the customer's country_of_residence or, when empty, the account country to match.

Methods

Manual finance permissions

Manual deposits, withdrawals and processing require enabled manager access. Super-admin managers are allowed; other callers need CRM access. Brand-scoped CRM admins bypass operation-specific finance flags, while ordinary CRM managers need the permissions shown below. Other Cashier methods retain their existing access policies.

Role Create manual transaction Create and process (process_now = 1) Process existing manual transaction
SESSION_CRM_ADMIN Allowed without extra finance flags Allowed without extra finance flags Allowed without extra finance flags
SESSION_CRM_MANAGER access_crm + set_finance access_crm + set_finance + approve_finance access_crm + approve_finance
SESSION_MANAGER / SESSION_ADMIN / SESSION_DEALER Forbidden Forbidden Forbidden

Managers must be enabled. CRM managers also need customer/account scope access. Business restrictions remain in effect for both CRM roles. See manual deposit, manual withdrawal and manual processing.

Available methods

Method Description
MngGetCashierTransactionsByFilter Returns Cashier transactions in table format
MngGetCashierTransaction Returns a single transaction with linked balance operations
MngUpdateCashierTransaction Updates transaction lifecycle/meta fields
MngCreateManualCashierDeposit Creates a manual deposit transaction
MngCreateManualCashierWithdrawal Creates a manual withdrawal transaction
MngProcessManualCashierTransaction Posts manual deposit/withdrawal balance operation
MngGetCashierProviderEventsByFilter Returns raw/normalized provider event log
MngGetCashierPaymentModules Returns discovered payment modules available for configuration
MngGetCashierProviderConfigsByFilter Returns activated provider configs with filtering and pagination
MngAddCashierProviderConfig Creates provider configuration
MngUpdateCashierProviderConfig Updates existing provider configuration
MngDeleteCashierProviderConfig Disables provider configuration
MngGetCashierCustomerProviderOverridesByFilter Returns customer-level provider overrides in table format
MngGetCashierCustomerProviderOverride Returns one customer-level provider override
MngUpdateCashierCustomerProviderOverride Creates or updates a customer-level provider override

Access

All manager Cashier methods require one of:

SESSION_MANAGER, SESSION_ADMIN, SESSION_DEALER, SESSION_CRM_MANAGER, SESSION_CRM_ADMIN.

Manager access is resolved from the cached staff record. The token is used only as a source of manager id and session type; permissions, brand, desks, and groups are not trusted from the token.

Cashier uses CRM finance permissions and manager scope:

Permission Used for
see_finance Read transactions, provider events, payment modules, provider configs, and customer provider overrides
set_finance Create manual transactions, update editable transaction fields, and create/update/delete provider configs or overrides
approve_finance Process manual transactions and move transactions to approved/completed statuses
decline_finance Move transactions to failed/cancelled/refunded/chargeback statuses

Transaction and override visibility is scoped through linked customer/account brand and desk. Provider config visibility is scoped by config brand. Provider events are scoped through the linked transaction when available; events without a linked transaction are visible only to admin or unscoped managers.

Transaction Statuses

Value Name Description
0 created Transaction record was created
1 pending_payment Waiting for payment provider action
2 provider_confirmed Provider confirmed payment
3 credited Funds were credited to the trading account
4 credit_failed Crediting failed after provider confirmation
5 failed Payment flow failed
6 cancelled Payment was cancelled
7 refunded Payment was refunded
8 chargeback Payment was charged back
9 manual_review Manual review is required
10 completed Manual withdrawal debit was accepted by the finance ledger
11 processing_ledger Durable ledger operation is pending or submitted; the result has not yet been reconciled

Before submitting an account balance operation, Cashier durably stores the transaction in processing_ledger with a linked pending balance-operation record. After a restart it reconciles that record against the existing finance trade at startup and about every 10 seconds, and finalizes it only after the matching trade result is confirmed committed in the trading database. If that durable confirmation is unavailable, the transaction remains unresolved even if a matching trade appears in the runtime cache. It never submits the same uncertain operation again. A manager retry of an already credited, completed, or processing_ledger transaction returns the existing transaction without another submission. Inspect MngGetCashierTransaction and its balance_operations before taking further action.

Transaction Ownership

Every transaction carries two manager references. Both are set at creation and never change afterwards; there is no command that reassigns them.

Field Type Meaning
attributed_manager_id int The manager the customer was assigned to at the moment the transaction was created
owner_manager_id int The Owner: the manager the transaction counts towards in statistics

Only the manual creation commands, MngCreateManualCashierDeposit and MngCreateManualCashierWithdrawal, accept owner_manager_id on input. Client-side deposits and withdrawals do not: their Owner is the manager the customer is assigned to at the moment of creation.

When owner_manager_id is omitted or 0, the Owner falls back to the customer assigned_manager_id, and to 0 when the customer is not assigned to anyone.

A non-zero owner_manager_id must name a manager that exists, is enabled, has access_crm = 1, is not the service recovery account, and belongs to the same brand as the customer. Otherwise the command answers 400 INVALID_MANAGER.

The money columns of MngGetManagersCustomerStatsByFilter are aggregated by Owner.