Appearance
Domain model (the double-entry foundation)
Ported faithfully from Tonder's glossary — it is rail- and storage-agnostic and is the heart of correctness.
Account types
Standard double-entry. Sign rules:
| Account type | DEBIT | CREDIT |
|---|---|---|
ASSET | + | − |
EXPENSE | + | − |
LIABILITY | − | + |
REVENUE | − | + |
EQUITY | − | + |
REVERSAL inverts the sign regardless of type.
Entity types
| Value | Vecnet meaning | Key prefix |
|---|---|---|
BUSINESS | Vecnet client / merchant (e.g. the government entity / operator) | ENT#{entity_id} |
ACQUIRER | A rail: tonder, menta, … | ACQ#{acquirer} |
PLATFORM | Vecnet itself | ENT#V1 |
Account codes
Each code implies a canonical account_type and entity_type.
| Code | Type | Entity | Purpose |
|---|---|---|---|
ACQUIRER_RECEIVABLE | ASSET | ACQUIRER | Funds receivable from a rail after capture |
BUSINESS_PAYABLE | LIABILITY | BUSINESS | Net owed to the merchant after fees |
PLATFORM_CLEARING | LIABILITY | PLATFORM | Temporary platform-fee clearing |
WITHDRAWAL_FUNDS | ASSET | ACQUIRER | Funds held at a rail to settle withdrawals |
BUSINESS_WITHDRAWAL_PAYABLE | LIABILITY | BUSINESS | Withdrawal amount owed to merchant |
PROCESSING_FEES_REVENUE | REVENUE | PLATFORM | Revenue from payin fees |
WITHDRAWAL_FEES_REVENUE | REVENUE | PLATFORM | Revenue from withdrawal fees |
ACQUIRER_FEES_EXPENSE | EXPENSE | PLATFORM | Payin fees charged by the rail |
WITHDRAWAL_ACQUIRER_FEES_EXPENSE | EXPENSE | PLATFORM | Withdrawal fees charged by the rail |
WITHDRAWAL_ACQUIRER_FEES_PAYABLE | LIABILITY | ACQUIRER | Owed to a rail for withdrawal fees |
VAT_PAYABLE | LIABILITY | PLATFORM | IVA collected, to remit |
VAT_RECEIVABLE | ASSET | PLATFORM | IVA paid to rails, reclaimable |
RESERVE_RECEIVABLE | ASSET | ACQUIRER | Rolling reserve a rail holds for the platform |
RESERVE_PAYABLE | LIABILITY | BUSINESS | Merchant balance held as rolling reserve |
BANK | ASSET | PLATFORM | Bank settlement account |
BUSINESS_SETTLEMENT_PENDING | LIABILITY | BUSINESS | Funds pending settlement disbursement |
PRIOR_PERIOD_ADJUSTMENT | EQUITY | PLATFORM | Contra for historical loads / prior-period fixes |
INFO
PLATFORM_CASH from Tonder is reserved/unused — omit it; use BANK for platform cash.
Entity → account-code map
Journals
Every transaction produces journals. journal_type ∈ {IN (rail side), OUT (business side)}.
journal_category:
- IN + OUT pair:
PAYMENT,VOID,REFUND,DISPUTE_WON,DISPUTE_IN_REVIEW,WITHDRAWAL,TOPUP. - Single journal:
SETTLEMENT_APPROVE,SETTLEMENT_CONFIRM,ROUTING,ROLLING_RESERVE_RELEASE,ADJUSTMENT.
Other enums (port verbatim)
entry_type:DEBIT,CREDIT.transaction_type:PAYMENT,PAYOUT,REFUND,DISPUTE,WITHDRAWAL,VOID.transfer_type→adjustment_typemapping (internal transfers — see Internal transfers).adjustment_type: full taxonomy — see the appendix.fee_rule_status:active/inactive.transaction_status:Success,PAID_FULL,Won,Needs Response,In Review,Liquidado,Lost.- Module flags:
FEES_CALCULATION,LEDGER_ENTRIES,DAILY_BALANCES,JOURNALS_GENERATION(see Config flags).
Rail / detail-type note
Tonder's DetailType / EventBridge taxonomy is AWS-specific. Vecnet's Listener normalizes each rail notification into a clean internal transaction_event (orchestrator). Keep the semantic categories; drop the EventBridge naming.