Skip to main content

Close Loan Account

Overviewโ€‹

Closes a loan account after all obligations have been fully satisfied.

Endpointโ€‹

POST /api/bpm/cmd

Request Headersโ€‹

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
Content-TypestringYesMust be application/json
X-Tenant-IdstringYesTenant identifier

Request Bodyโ€‹

{
"cmd": "CloseLoanCommand",
"data": {
"accountEncodedKey": "LN-2024-001234",
"comment": "Loan fully repaid ahead of schedule"
}
}

Parametersโ€‹

ParameterTypeRequiredDescription
cmdstringYesMust be "CloseLoanCommand"
dataobjectYesClosure data
รขโ€ ยณ accountEncodedKeystringYesLoan account identifier (EncodedKey or AccountNumber)
รขโ€ ยณ commentstringNoClosure notes

Responseโ€‹

Success Response (200 OK)โ€‹

{
"success": true,
"message": "Loan closed successfully",
"data": {
"loanId": "LA-2024-00001",
"loanAccountNumber": "3001234567890",
"status": "Closed",
"closureDate": "2024-12-15T10:00:00Z",
"closureType": "FullRepayment",
"totalPrincipalRepaid": 50000.00,
"totalInterestRepaid": 6850.00,
"totalAmountRepaid": 56850.00,
"outstandingBalance": 0.00,
"closedBy": "system@bank.com"
}
}

Status Codesโ€‹

CodeDescription
200Loan closed successfully
400Loan has outstanding balance or cannot be closed
401Unauthorized
403Insufficient authority
404Loan not found
409Loan already closed
500Internal server error

Business Rulesโ€‹

  • All principal and interest must be fully paid
  • Outstanding fees can be waived with authorization
  • Guarantor releases processed automatically
  • Collateral release initiated
  • Customer receives closure confirmation
  • Historical data retained for reporting

Code Examplesโ€‹

C# Exampleโ€‹

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

TypeScript Exampleโ€‹

async function closeLoan(loanId: string, closureType: string, waiveFees: boolean = false): Promise<ClosureResponse> {
const response = await fetch('/api/administration/loan/close', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`,
'X-Tenant-Id': tenantId
},
body: JSON.stringify({ loanId, closureType, waiveFees })
});

const result = await response.json();
return result.data;
}

Notesโ€‹

  • Validates all outstanding balances before closure
  • Releases guarantors and collateral
  • Generates closure certificate for customer
  • Updates customer credit profile
  • Archived for regulatory retention
  • Cannot be reopened once closed