Appearance
Domain Glossary
Reference of all domain enums, codes, and classification types used across the finances system.
Account Types (AccountTypeEnum)
Follows standard double-entry accounting classification.
| Value | Description |
|---|---|
ASSET | Resources owned. Debit increases, credit decreases. |
LIABILITY | Obligations owed. Credit increases, debit decreases. |
REVENUE | Income earned. Credit increases, debit decreases. |
EXPENSE | Costs incurred. Debit increases, credit decreases. |
EQUITY | Owner's residual interest. Credit increases, debit decreases. |
Debit / Credit Sign Rules
| Account Type | DEBIT effect | CREDIT effect |
|---|---|---|
| ASSET | + (increase) | − (decrease) |
| EXPENSE | + (increase) | − (decrease) |
| LIABILITY | − (decrease) | + (increase) |
| REVENUE | − (decrease) | + (increase) |
| EQUITY | − (decrease) | + (increase) |
REVERSAL entries invert the sign regardless of account type.
Account Codes (AccountCodeEnum)
Standardized account identifiers. Each code implies a specific AccountTypeEnum and EntityTypeEnum.
Payin Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
ACQUIRER_RECEIVABLE | ASSET | ACQUIRER | Funds receivable from acquirer after a payment is captured |
BUSINESS_PAYABLE | LIABILITY | BUSINESS | Net amount owed to the merchant after fees |
PLATFORM_CLEARING | LIABILITY | PLATFORM | Temporary holding account for platform fee clearing |
Cash Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
PLATFORM_CASH | ASSET | PLATFORM | (Reserved — currently unused.) Defined in the enum but not referenced by any preparer or entry generator. Use BANK for a platform-level cash account. |
WITHDRAWAL_FUNDS | ASSET | ACQUIRER | Funds held at the acquirer to settle withdrawals. Queried per-acquirer via ACQ#{acquirer}#CUR#{currency}. |
Withdrawal Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
BUSINESS_WITHDRAWAL_PAYABLE | LIABILITY | BUSINESS | Withdrawal amount owed to the merchant |
Revenue Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
PROCESSING_FEES_REVENUE | REVENUE | PLATFORM | Revenue from payin processing fees |
WITHDRAWAL_FEES_REVENUE | REVENUE | PLATFORM | Revenue from withdrawal processing fees |
Third-Party Cost Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
ACQUIRER_FEES_EXPENSE | EXPENSE | PLATFORM | Payin fees charged by the acquirer — recorded as an expense on the platform's books (ENT#T1#CUR#{currency}). |
WITHDRAWAL_ACQUIRER_FEES_EXPENSE | EXPENSE | PLATFORM | Withdrawal fees charged by the acquirer — expense on the platform's books (ENT#T1#CUR#{currency}). |
WITHDRAWAL_ACQUIRER_FEES_PAYABLE | LIABILITY | ACQUIRER | Amount owed to the specific acquirer for withdrawal fees (ACQ#{acquirer}#CUR#{currency}). |
Tax Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
VAT_PAYABLE | LIABILITY | PLATFORM | IVA/VAT collected, to be remitted |
VAT_RECEIVABLE | ASSET | PLATFORM | IVA/VAT paid to acquirers, reclaimable |
Reserve Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
RESERVE_RECEIVABLE | ASSET | ACQUIRER | Rolling reserve the acquirer is holding on behalf of the platform. One account per acquirer (ACQ#{acquirer}#CUR#{currency}). |
RESERVE_PAYABLE | LIABILITY | BUSINESS | The portion of the merchant's balance held as rolling reserve — the platform's obligation to release it back to the merchant (ENT#{entity_id}#CUR#{currency}). |
Other Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
BANK | ASSET | PLATFORM | Bank settlement account |
BUSINESS_SETTLEMENT_PENDING | LIABILITY | BUSINESS | Funds pending settlement disbursement |
Equity Accounts
| Code | Type | Entity | Description |
|---|---|---|---|
PRIOR_PERIOD_ADJUSTMENT | EQUITY | PLATFORM | Contra account for historical balance loads and prior-period corrections. Used as the source when loading opening balances into merchant accounts that predate the system. |
Entity Types (EntityTypeEnum)
| Value | Description |
|---|---|
BUSINESS | Merchant / commercial entity. Has accounts prefixed ENT#{entity_id}#CUR#{currency}. |
ACQUIRER | Payment processor. Has accounts prefixed ACQ#{acquirer}#CUR#{currency}. |
PLATFORM | Tonder platform itself. Has accounts prefixed ENT#T1#CUR#{currency}. |
Journal Types (JournalTypeEnum)
Every transaction produces a pair of journals:
| Value | Description |
|---|---|
IN | Acquirer-side journal. Records what the acquirer owes/receives. |
OUT | Business-side journal. Records the merchant's net, fees, and platform revenue. |
Journal Categories (JournalCategoryEnum)
| Value | Description | Produces |
|---|---|---|
PAYMENT | Successful payment captured | IN + OUT pair |
VOID | Payment voided before settlement | IN + OUT pair |
REFUND | Full or partial refund | IN + OUT pair |
DISPUTE_WON | Dispute resolved in merchant's favor | IN + OUT pair |
DISPUTE_IN_REVIEW | Dispute opened, under review | IN + OUT pair |
WITHDRAWAL | Merchant withdrawal (payout) | IN + OUT pair |
TOPUP | Withdrawal account top-up | IN + OUT pair |
SETTLEMENT_APPROVE | Settlement approved, journals tagged | Single journal |
SETTLEMENT_CONFIRM | Settlement confirmed, funds disbursed | Single journal |
ROUTING | Platform routing entry during settlement | Single journal |
ROLLING_RESERVE_RELEASE | Scheduled release of rolling reserve | Single journal |
ADJUSTMENT | Manual adjustment / internal transfer | Single journal |
Entry Types (EntryTypeEnum)
| Value | Description |
|---|---|
DEBIT | Left side of double-entry. Increases ASSET/EXPENSE, decreases LIABILITY/REVENUE/EQUITY. |
CREDIT | Right side of double-entry. Increases LIABILITY/REVENUE/EQUITY, decreases ASSET/EXPENSE. |
Transaction Types (TransactionTypeEnum)
Source event types from the payments system:
| Value | Description |
|---|---|
PAYMENT | Card or APM payment captured |
PAYOUT | Outbound payout to external account |
REFUND | Full or partial refund of a payment |
DISPUTE | Chargeback or dispute event |
WITHDRAWAL | Merchant fund withdrawal |
VOID | Payment void before settlement |
Detail Types (DetailTypeEnum)
EventBridge detail-type values that trigger processing:
| Value | EventBridge Source | Description |
|---|---|---|
PAYMENTS.PAYMENT | PAYMENTS | Standard card payment |
APMS.PAYMENT | APMS | Alternative payment method (bitso, oxxopay, mercadopago) |
WITHDRAWALS.WITHDRAWAL | WITHDRAWALS | Merchant withdrawal |
WITHDRAWALS.TOPUP | WITHDRAWALS | Withdrawal account top-up |
PAYOUTS.PAYOUT | PAYOUTS | External payout |
WITHDRAWALS_ACCOUNT_ACTIVITY.DEPOSIT | WITHDRAWALS | WAA deposit |
PAYMENTS.REFUND | PAYMENTS | Refund event |
PAYMENTS.DISPUTE | PAYMENTS | Dispute/chargeback event |
PAYMENTS.VOID | PAYMENTS | Payment void |
SETTLEMENTS.SETTLEMENT_APPROVE | SETTLEMENTS | Settlement approval |
SETTLEMENTS.SETTLEMENT_CONFIRM | SETTLEMENTS | Settlement confirmation |
ROUTING.ROUTING | ROUTING | Platform routing |
ROLLING_RESERVE.ROLLING_RESERVE_RELEASE | ROLLING_RESERVE | Reserve release |
Transfer Types (TransferTypeEnum)
Used in internal transfers (POST /v1/accounts/transfers). Each maps to an AdjustmentTypeEnum:
| Transfer Type | Maps To | Use Case |
|---|---|---|
PAYMENT_CORRECTION | MANUAL_ADJUSTMENT | Fix an incorrect payment amount or allocation |
FEE_ADJUSTMENT | FEE_CORRECTION | Correct a fee that was over/under-charged |
RESERVE_MOVEMENT | RESERVE_ADJUSTMENT | Move funds to/from rolling reserve |
SERVICE_CREDIT | SERVICE_COMPENSATION | Credit a merchant for a service issue |
BALANCE_RECONCILIATION | BALANCE_RECONCILIATION | Reconcile a balance discrepancy |
TAX_ADJUSTMENT | TAX_CORRECTION | Correct a tax calculation (IVA) |
PRIOR_PERIOD_CORRECTION | PRIOR_PERIOD_CORRECTION | Load historical balance or correct a prior accounting period. Source is always PRIOR_PERIOD_ADJUSTMENT (equity). |
Adjustment Types (AdjustmentTypeEnum)
Full taxonomy of adjustment reasons used in journal metadata:
Product Reversals
| Value | Description |
|---|---|
PAYMENT_REVERSAL | Reverse a payment entry |
WITHDRAWAL_REVERSAL | Reverse a withdrawal entry |
REFUND_REVERSAL | Reverse a refund entry |
Flow-Specific Corrections
| Value | Description |
|---|---|
REFUND_CORRECTION | Fix a refund amount or allocation |
DISPUTE_CORRECTION | Fix a dispute resolution entry |
Fees / Costs / Income
| Value | Description |
|---|---|
FEE_CORRECTION | Correct an over/under-charged fee |
PROVIDER_CORRECTION | Correct an acquirer/provider fee |
SERVICE_COMPENSATION | Credit for service disruption or error |
PROMOTIONAL_CREDIT | Promotional credit or discount |
Taxes, FX, Reserves, Risk
| Value | Description |
|---|---|
TAX_CORRECTION | Correct IVA/VAT calculation |
FX_RATE_CORRECTION | Correct FX rate conversion |
RESERVE_ADJUSTMENT | Modify rolling reserve amount |
RISK_ADJUSTMENT | Risk-related balance adjustment |
General Accounting
| Value | Description |
|---|---|
BALANCE_RECONCILIATION | Reconcile a balance discrepancy |
ACCOUNTING_ERROR_CORRECTION | Fix a double-entry accounting error |
TECHNICAL_CORRECTION | Fix a system/technical issue |
WRITE_OFF | Write off an uncollectable amount |
PRIOR_PERIOD_CORRECTION | Load historical balance or correct a prior accounting period (uses PRIOR_PERIOD_ADJUSTMENT equity as contra) |
Manual / Catch-All
| Value | Description |
|---|---|
MANUAL_ADJUSTMENT | General manual adjustment (requires description) |
OTHER | Other adjustment not covered above |
Finances Module Flags (FinancesModuleEnum)
Per-acquirer configuration flags in FinancesConfigService:
| Value | Controls | Description |
|---|---|---|
FEES_CALCULATION | Fee engine | Which journal categories trigger fee calculation. Array of category names. |
LEDGER_ENTRIES | Ledger entries | Whether to generate ledger entries and update account balances. Boolean. |
DAILY_BALANCES | Balance snapshots | Whether to generate daily balance snapshots. Boolean. |
JOURNALS_GENERATION | Journal creation | Whether to generate accounting journals. Boolean. |
Fee Rule Status (FeeRuleStatusEnum)
| Value | Description |
|---|---|
active | Rule is active and participates in fee matching |
inactive | Rule is disabled; ignored during fee calculation |
Supported Acquirers (ACQEnum)
| Value | Notes |
|---|---|
kushki | Card payments (LATAM) |
unlimit | Card payments (international) |
stp | Bank transfers (Mexico) |
oxxopay | Cash payments — always routed as APMS_PAYMENT |
safetypay | Bank transfers |
mercadopago | Multiple methods — always routed as APMS_PAYMENT |
neosurf | Voucher payments |
bitso | Crypto payments — always routed as APMS_PAYMENT |
spei | SPEI bank transfers (Mexico) |
Fixed APM acquirers:
bitso,oxxopay,mercadopagoalways map toDetailTypeEnum.APMS_PAYMENTregardless of the originaltransaction_type.
Transaction Status (TransactionStatusEnum)
Status values from the upstream payments system:
| Value | Description |
|---|---|
Success | Transaction completed successfully |
PAID_FULL | Full payment received |
Won | Dispute won by merchant |
Needs Response | Dispute requires merchant response |
In Review | Dispute under review |
Liquidado | Settled/liquidated |
Lost | Dispute lost |
Error Codes (ErrorEnum)
| Code | HTTP Status | Message |
|---|---|---|
E001 | 500 | Unexpected error |
E002 | 401 | Unauthorized |
E003 | 404 | Not found |
E004 | 400 | Bad request |
E005 | 409 | Record already exists |
E006 | 500 | Error creating record |
E007 | 500 | Error updating record |
E008 | 500 | Error deleting record |
E009 | 500 | Error fetching record |
E0010 | 500 | Error fetching records |
E0011 | 400 | Action not allowed |
E0012 | 404 | Business not found |
E0013 | 404 | Fee rules not found |
E0014 | 400 | No settlement policy configured |
E0015 | 400 | Detail type not supported |
E0016 | 400 | Journal type not supported |
E0017 | 400 | Settlement already processed |
E0018 | 400 | No approved settlement pending confirmation |