Skip to main content

AddLoanDeductionCommand

Overview​

Adds a custom deduction to a loan application. Deductions are applied at disbursement time and reduce the net amount disbursed to the customer. Common uses include credit life insurance, legal fees, or processing charges not covered by the product's default disbursement fee.

Command Structure​

{
"cmd": "AddLoanDeductionCommand",
"data": "{\"loanRequestId\":110,\"code\":\"CLI\",\"name\":\"Credit Life Insurance\",\"deduction\":1.0,\"deductionCalculation\":1}"
}

Parameters​

ParameterTypeRequiredDescription
loanRequestIdlongYesID of the loan application
codestringYesUnique code for this deduction (scoped per loan)
namestringYesDisplay name
deductiondecimalYesAmount or percentage value
deductionCalculationintYesHow the deduction is calculated (see enum below)

deductionCalculation Enum​

ValueDescription
0Flat amount — deducted as a fixed value
1Percentage of the loan amount
2Percentage of the disbursed amount

Validations​

  • A deduction with the same code must not already exist for the loan — returns an error if a duplicate is detected

Response​

{
"ok": true,
"statusCode": "00",
"message": "Deduction added successfully.",
"outData": {
"Id": 7,
"Name": "Credit Life Insurance",
"Code": "CLI",
"DisbursementFee": 1.0,
"DisbursementFeeCalculation": 1,
"CreatedBy": "finance.officer",
"CreatedAt": "2026-06-10T10:00:00Z"
}
}