Skip to content

Accounting Rules & Frequent Postings

Accounting rules let you define reusable journal entry templates for transactions that occur regularly - monthly provisions, tax postings, management fee allocations, or any other recurring double-entry. Instead of specifying debit and credit accounts every time, you define the rule once and reference it when posting.

When to use this

Accounting rules are for manual, recurring journal entries that staff post on a schedule. Automated accounting for loans and savings (disbursements, repayments, interest accruals) is handled by Fineract's product accounting configuration - no rules needed there.


What an Accounting Rule Defines

Each rule specifies:

  • A name and description
  • The office it applies to (or all offices)
  • One or more debit account options the user can choose from when posting
  • One or more credit account options the user can choose from when posting
  • Whether the rule allows multiple debit/credit lines (complex entries) or single-line only

Creating an Accounting Rule

bash
POST /fineract-provider/api/v1/accountingrules
Authorization: Basic <base64>
Fineract-Platform-TenantId: default
Content-Type: application/json

Example: Monthly loan loss provision

json
{
  "name": "Monthly Loan Loss Provision",
  "officeId": 1,
  "accountToDebit": 30001,
  "accountToCredit": 20005,
  "description": "Monthly provision for expected loan losses",
  "allowMultipleDebitEntries": false,
  "allowMultipleCreditEntries": false
}

accountToDebit and accountToCredit are GL account IDs (not codes). Retrieve them from:

bash
GET /fineract-provider/api/v1/glaccounts?usage=1

Example: Rule with multiple debit/credit options

When a rule can post to one of several accounts (e.g., inter-branch allocation that goes to different branch accounts), provide arrays:

json
{
  "name": "Branch Fee Allocation",
  "officeId": 1,
  "debitAccountHead": [
    { "glAccountId": 40001 },
    { "glAccountId": 40002 }
  ],
  "creditAccountHead": [
    { "glAccountId": 50001 },
    { "glAccountId": 50002 }
  ],
  "allowMultipleDebitEntries": false,
  "allowMultipleCreditEntries": false,
  "description": "Allocate branch fees to cost centres"
}

When posting using this rule, the user selects which debit and credit account to use from the allowed options.


Listing Accounting Rules

bash
# All rules
GET /fineract-provider/api/v1/accountingrules

# Rules for a specific office
GET /fineract-provider/api/v1/accountingrules?officeId=1

# A single rule
GET /fineract-provider/api/v1/accountingrules/{ruleId}

Posting a Journal Entry Using a Rule

Once a rule exists, post a journal entry referencing it:

bash
POST /fineract-provider/api/v1/journalentries
Authorization: Basic <base64>
Fineract-Platform-TenantId: default
Content-Type: application/json
json
{
  "officeId": 1,
  "transactionDate": "31 March 2025",
  "currencyCode": "USD",
  "accountingRuleId": 3,
  "amount": 5000.00,
  "comments": "Q1 loan loss provision",
  "dateFormat": "dd MMMM yyyy",
  "locale": "en"
}

Fineract uses the rule to determine which accounts to debit and credit. If the rule allows multiple account options, also specify which ones to use:

json
{
  "officeId": 1,
  "transactionDate": "31 March 2025",
  "currencyCode": "USD",
  "accountingRuleId": 4,
  "amount": 1200.00,
  "debits": [{ "glAccountId": 40001, "amount": 1200.00 }],
  "credits": [{ "glAccountId": 50001, "amount": 1200.00 }],
  "comments": "Branch North fee allocation",
  "dateFormat": "dd MMMM yyyy",
  "locale": "en"
}

Updating and Deleting Rules

bash
# Update a rule
PUT /fineract-provider/api/v1/accountingrules/{ruleId}
{
  "name": "Monthly Loan Loss Provision - Updated",
  "description": "Updated rule for Q2"
}

# Delete a rule (only if no journal entries reference it)
DELETE /fineract-provider/api/v1/accountingrules/{ruleId}

Viewing Posted Journal Entries

Journal entries posted via rules appear in the standard journal entries log alongside all other entries:

bash
# Journal entries for an office on a specific date
GET /fineract-provider/api/v1/journalentries?officeId=1&transactionDate=31 March 2025&dateFormat=dd MMMM yyyy&locale=en

# Entries referencing a specific GL account
GET /fineract-provider/api/v1/journalentries?glAccountId=30001

# Entries by transaction ID
GET /fineract-provider/api/v1/journalentries?transactionId=T-0012345

Reversing a Journal Entry

Manual journal entries can be reversed if posted in error:

bash
POST /fineract-provider/api/v1/journalentries/{transactionId}?command=reverse
json
{
  "comments": "Reversing duplicate provision entry",
  "locale": "en"
}

Reversal creates a mirror entry on the same accounts with debit and credit swapped.


Common Use Cases

Rule nameDebitCreditFrequency
Loan loss provisionProvision expenseAllowance for loan lossesMonthly
Interest income recognitionAccrued interest receivableInterest incomeMonthly
Management feeOperating expenseManagement fee payableMonthly
Branch cost allocationBranch operating costsHead office allocationMonthly
Tax provisionTax expenseTax payableQuarterly
DepreciationDepreciation expenseAccumulated depreciationMonthly

Relationship to Product Accounting

Accounting rules are for manual journal entries only. They do not affect:

  • Loan disbursement entries (driven by loan product GL mappings)
  • Repayment and interest entries (driven by loan product GL mappings)
  • Savings deposit/withdrawal entries (driven by savings product GL mappings)
  • COB accrual entries (generated automatically by the batch process)

If you need to change how automated entries post, update the product's accounting configuration. See the Accounting Setup guide.