BookKeepingConfig (v1.0.0)

Configuration entity that defines bookkeeping rules and transaction definitions for accounting operations

BookKeepingConfig Entity

The BookKeepingConfig entity defines the configuration and rules for bookkeeping operations within the accounting system. It establishes the relationship between transaction types and their corresponding posting rules, ensuring consistent financial recording across all operations.

Properties

NameTypeRequiredDescription
idintegerRequiredUnique identifier for the bookkeeping configuration (auto-generated primary key)
namestringRequiredDescriptive name of the configuration
chart_of_accounts_fkintegerOptionalForeign key reference to the chart of accounts

Schema

schema.json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "BookKeepingConfig",
"description": "Configuration entity that defines bookkeeping rules and transaction definitions for accounting operations",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier for the bookkeeping configuration (auto-generated primary key)",
"example": 15656
},
"name": {
"type": "string",
"description": "Descriptive name of the configuration",
"example": "easy/merchant"
},
"chart_of_accounts_fk": {
"type": "integer",
"description": "Foreign key reference to the chart of accounts",
"example": 15655
}
},
"required": ["id", "name"],
"additionalProperties": false
}

Configuration Structure

The bookkeeping configuration organizes financial rules through:

  • Transaction Definitions: Specific transaction types and their processing rules
  • Posting Rules: Instructions for how transactions affect different accounts
  • Account Mappings: Relationships between transaction types and target accounts
  • Validation Rules: Business rules that must be satisfied for transaction processing

Supported Transaction Types

Common transaction types managed by bookkeeping configurations include:

  • CHARGE: Customer payment transactions
  • REFUND: Money returned to customers
  • FEE_ADDED: Additional fees applied to transactions
  • CHARGEBACK: Disputed transaction reversals
  • TOPUP: Account balance increases
  • REMITTANCE: Settlement payments to merchants
  • ADJUSTMENT_CREDIT/DEBIT: Manual balance adjustments
  • SCHEME_FEE: Payment scheme processing fees

Integration Points

The BookKeepingConfig is used by:

  • AccountingConfigService: To retrieve posting rules for transaction processing
  • MerchantAccount Aggregate: To validate and process financial transactions
  • Admin Backend: For configuration management and updates
  • Transaction Processing: To determine correct account postings

Validation and Compliance

  • Ensures double-entry bookkeeping principles are maintained
  • Validates that all transaction types have corresponding posting rules
  • Enforces business rules specific to different merchant types or regions
  • Supports currency-specific configurations

Configuration Management

  • Managed through the admin backend interface
  • Supports versioning and change tracking
  • Allows for environment-specific configurations
  • Enables real-time updates without service restarts