Skip to content

Configurations CRUD

Per-business financial module configuration: control which processing modules are active for each acquirer.


Overview

AttributeValue
Servicesrc/service/FinancesConfigService.ts
StorageMongoDB financesConfig collection
Schemasrc/schema/finances_config_request.json

Configuration Model

Each configuration defines which financial modules are enabled for a specific business (or globally).

FieldTypeDescription
_idObjectIdMongoDB document ID
entity_idstringBusiness ID, or global for global configuration
entity_typestringBUSINESS or GLOBAL
descriptionstringHuman-readable description
acquirersobjectPer-acquirer module configuration (keyed by acquirer name)
created_atstringCreation timestamp
modified_atstringLast modification timestamp

Per-Acquirer Configuration

Each key in the acquirers object is an acquirer name (e.g., kushki, unlimit) or _default for the fallback configuration.

FieldTypeDescription
fees_calculationstring[]Journal categories that trigger fee calculation. Array of JournalCategoryEnum values.
ledger_entriesbooleanWhether to generate ledger entries and update account balances
journals_generationbooleanWhether to generate accounting journals
daily_balancesbooleanWhether to include in daily balance snapshots

The _default Acquirer Key

When a transaction comes from an acquirer not explicitly configured, the system falls back to the _default key. If neither the specific acquirer nor _default exists, the module is considered disabled.

Example Configuration

json
{
  "entity_id": "business-123",
  "entity_type": "BUSINESS",
  "description": "Config for Business ABC",
  "acquirers": {
    "_default": {
      "fees_calculation": ["PAYMENT", "REFUND", "DISPUTE_WON", "DISPUTE_IN_REVIEW", "VOID"],
      "ledger_entries": true,
      "journals_generation": true,
      "daily_balances": true
    },
    "kushki": {
      "fees_calculation": ["PAYMENT", "REFUND", "DISPUTE_WON", "DISPUTE_IN_REVIEW", "VOID", "WITHDRAWAL", "TOPUP"],
      "ledger_entries": true,
      "journals_generation": true,
      "daily_balances": true
    }
  }
}

Endpoints

MethodPathDescription
POST/v1/configurationsCreate a new configuration
GET/v1/configurationsList configurations with filters
GET/v1/configurations/{id}Get configuration by ID
PATCH/v1/configurations/{id}Update configuration
DELETE/v1/configurations/{id}Delete configuration

Module Impact

What happens when each module is disabled:

ModuleWhen Disabled
fees_calculationFees are not calculated for the specified categories. Journals will have zero fee amounts.
journals_generationNo journals are created. No accounting record of the transaction.
ledger_entriesJournals are created but no ledger entries generated. Account balances are NOT updated.
daily_balancesBusiness excluded from daily balance snapshot reports.

Important: Disabling journals_generation effectively disables the entire financial processing for that acquirer, since journals are the foundation for ledger entries and settlements.


Global vs Business-Specific

  • Business-specific (entity_id = business ID): Applies only to that business
  • Global (entity_id = global): Applies to all businesses without a specific configuration

Lookup order: business-specific → global → module disabled.


Processing Flow

Vecnet — Build Spec v0.2 · Obsidian Terminal