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​
| Parameter | Type | Required | Description |
|---|---|---|---|
loanRequestId | long | Yes | ID of the loan application |
code | string | Yes | Unique code for this deduction (scoped per loan) |
name | string | Yes | Display name |
deduction | decimal | Yes | Amount or percentage value |
deductionCalculation | int | Yes | How the deduction is calculated (see enum below) |
deductionCalculation Enum​
| Value | Description |
|---|---|
0 | Flat amount — deducted as a fixed value |
1 | Percentage of the loan amount |
2 | Percentage of the disbursed amount |
Validations​
- A deduction with the same
codemust 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"
}
}