Skip to main content

Tariff

1. Overview

The Tariff module in Sumo Ledger monitors the execution of tariff calculations across all configured tariff definitions. Tariffs are programmable fee, charge, or calculation engines that run during transaction processing — for example, calculating processing fees, interest amounts, credit scores, or routing decisions.

The Tariff module provides a dashboard view of tariff execution volume, success rates, and failure rates, helping administrators ensure that all fee and calculation engines are running correctly.

Navigation: Tariff (main sidebar menu)

URL: https://las.ledger.raralabs.dev/tariff


2. Tariff Overview Page

2.1 Tariff Volume Trend

A bar chart showing tariff execution volume over time. The x-axis shows dates and the y-axis shows the count of tariff executions. A Date Range filter (e.g., 2026-06-13 to 2026-07-13) controls the time window.

2.2 Tariff Summary Table

Below the chart, a table summarizes tariff activity for the Last 30 Days:

ColumnDescription
Tariff NameThe name of the tariff definition (e.g., process_fee_calculator, payday_disburse_route, overdue_check). Clicking navigates to the detail view for that tariff.
Total RequestsThe total number of times this tariff was executed in the last 30 days.
SuccessThe number of successful executions.
FailedThe number of failed executions.

2.3 Common Tariff Types

Tariff definitions reflect the various calculations and logic configured in your system. Typical examples include:

Tariff NamePurpose
process_fee_calculatorCalculates processing fees for transactions.
scrip_fee_calculatorCalculates fees related to securities/scrip transactions.
payday_disburse_routeDetermines the disbursement route for payday loans.
payday_decisionMakes approval/rejection decisions for payday loans.
payday_intent_scoreCalculates intent scores for loan applications.
payday_hard_rejectApplies hard rejection rules to loan applications.
payday_eligible_amountCalculates the eligible loan amount for a customer.
payday_capacity_scoreCalculates repayment capacity scores.
overdue_checkChecks whether an account or loan is overdue.
reversal_amountCalculates the amount for transaction reversals.
unique_id_generatorGenerates unique identifiers for records.
verify_margin_callVerifies margin call requirements.
valuation_tariffPerforms asset valuation calculations.

3. Tariff Detail View

Clicking on a tariff name opens its execution detail view, showing individual execution records with timestamps, input parameters, results, and any error messages.


4. How Tariffs Work in Practice

Execution Flow

  1. A transaction reaches a process stage that references a tariff.
  2. The system invokes the tariff engine with the transaction's parameters.
  3. The tariff calculates the result (e.g., a fee amount, a score, a routing decision).
  4. The result is returned to the process stage, which uses it in subsequent steps (e.g., posting the fee, making an approval decision).
  5. The execution is logged in the Tariff module.

Relationship to Configuration

Tariff definitions are created and maintained in Configurations > Tariff. The main menu Tariff module is the monitoring dashboard — it shows how tariffs are performing, not how they are configured.


5. Best Practices

  1. Monitor for failures daily. A tariff failure typically means a transaction could not be fully processed. Investigate failures promptly.
  2. Check tariffs with zero executions. If a tariff shows zero requests over 30 days, verify whether it is still being referenced by active processes.
  3. Use the volume trend to spot anomalies. Sudden spikes may indicate batch processing; sudden drops may indicate a process change that bypasses the tariff.
  4. Test tariff changes thoroughly. After modifying a tariff definition in Configurations, monitor this dashboard to confirm the changes are producing expected results.
  5. Correlate tariff failures with Connect failures. Some tariffs depend on external API connections. If a tariff fails, check the Connect module for related connection issues.