https://{your-domain}.fincode.software/api/v1/services/user/loan-details-with-payment-history/{loan-application-id}
{
"status": "<string>",
"data": {
"loanApplicationId": "<string>",
"customerId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"loanProductName": "<string>",
"loanApplicationStatus": "<string>",
"accountState": "<string>",
"loanAmount": 123,
"interestRate": 123,
"totalRepaymentAmount": 123,
"totalBalance": 123,
"principalBalance": 123,
"interestBalance": 123,
"feesBalance": 123,
"penaltyBalance": 123,
"totalAmountPaid": 123,
"principalPaid": 123,
"interestPaid": 123,
"feesPaid": 123,
"penaltyPaid": 123,
"applicationDate": "<string>",
"disbursementDate": "<string>",
"firstInstallmentDate": "<string>",
"maturityDate": "<string>",
"nextPaymentDueDate": "<string>",
"totalInstallments": 123,
"installmentsPaid": 123,
"installmentsRemaining": 123,
"loanDuration": 123,
"durationCounter": "<string>",
"loanRepaymentMethod": "<string>",
"isThirdPartyPayment": true,
"repaymentBankName": "<string>",
"repaymentAccountNumber": "<string>",
"repaymentAccountName": "<string>",
"loanFullyRepaid": true,
"currencyCode": "<string>",
"paymentHistory": [
{
"installmentNumber": 123,
"dueDate": "<string>",
"installmentAmount": 123,
"principalAmount": 123,
"interestAmount": 123,
"feesAmount": 123,
"penaltyAmount": 123,
"amountPaid": 123,
"outstandingAmount": 123,
"paymentStatus": "<string>",
"paymentDate": "<string>",
"daysOverdue": 123
}
]
}
}API Endpoints
Loan Details with Payment History
Retrieves comprehensive loan application details including payment history and installment schedule.
GET
/
api
/
v1
/
services
/
user
/
loan-details-with-payment-history
/
{loan-application-id}
https://{your-domain}.fincode.software/api/v1/services/user/loan-details-with-payment-history/{loan-application-id}
{
"status": "<string>",
"data": {
"loanApplicationId": "<string>",
"customerId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"loanProductName": "<string>",
"loanApplicationStatus": "<string>",
"accountState": "<string>",
"loanAmount": 123,
"interestRate": 123,
"totalRepaymentAmount": 123,
"totalBalance": 123,
"principalBalance": 123,
"interestBalance": 123,
"feesBalance": 123,
"penaltyBalance": 123,
"totalAmountPaid": 123,
"principalPaid": 123,
"interestPaid": 123,
"feesPaid": 123,
"penaltyPaid": 123,
"applicationDate": "<string>",
"disbursementDate": "<string>",
"firstInstallmentDate": "<string>",
"maturityDate": "<string>",
"nextPaymentDueDate": "<string>",
"totalInstallments": 123,
"installmentsPaid": 123,
"installmentsRemaining": 123,
"loanDuration": 123,
"durationCounter": "<string>",
"loanRepaymentMethod": "<string>",
"isThirdPartyPayment": true,
"repaymentBankName": "<string>",
"repaymentAccountNumber": "<string>",
"repaymentAccountName": "<string>",
"loanFullyRepaid": true,
"currencyCode": "<string>",
"paymentHistory": [
{
"installmentNumber": 123,
"dueDate": "<string>",
"installmentAmount": 123,
"principalAmount": 123,
"interestAmount": 123,
"feesAmount": 123,
"penaltyAmount": 123,
"amountPaid": 123,
"outstandingAmount": 123,
"paymentStatus": "<string>",
"paymentDate": "<string>",
"daysOverdue": 123
}
]
}
}Fetches detailed information about a loan application including all installments, payment history, outstanding balances, and repayment schedule.
https://{your-domain}.fincode.software/api/v1/services/user/loan-details-with-payment-history/{loan-application-id}
Request Headers
string
required
The JWT Access Token obtained from the
/login or /refresh-token endpoint.string
required
Unique idempotency key for the request to prevent duplicate processing.
string
required
The date and time at which the request was initiated (ISO 8601 format).
string
required
The IP address of the customer making the request.
string
required
Unique identifier for the interaction/session.
Path Parameters
string
required
The unique identifier (UUID) of the loan application for which to retrieve details.
Response
Returns comprehensive loan details including installment schedule and payment history.string
default:"SUCCESS"
Overall status of the API request.
object
Loan application details with payment history.
Show data object
Show data object
string
Unique identifier of the loan application.
string
Unique identifier of the customer.
string
Name of the customer.
string
Email address of the customer.
string
Name of the loan product.
string
Current status of the loan application (e.g.,
REQUESTED, APPROVED, DISBURSED).string
Account state (e.g.,
ACTIVE, CLOSED, ACTIVE_IN_ARREARS).number
Original loan amount (principal).
number
Interest rate applicable to the loan.
number
Total repayment amount (principal + total interest + fees).
number
Total outstanding balance.
number
Outstanding principal balance.
number
Outstanding interest balance.
number
Outstanding fees balance.
number
Outstanding penalty balance.
number
Total amount paid so far.
number
Principal amount paid.
number
Interest amount paid.
number
Fees amount paid.
number
Penalty amount paid.
string
Date when the loan application was created.
string
Date when the loan was disbursed.
string
Date of the first installment.
string
Loan maturity date.
string
Next payment due date.
number
Total number of installments.
number
Number of installments paid.
number
Number of installments remaining.
number
Loan duration.
string
Duration counter unit (e.g.,
MONTH, WEEK, DAY).string
Loan repayment method (e.g.,
External Bank Transfer, Internal Bank Transfer).boolean
Whether the loan uses third-party payment collection (e.g., Remita).
string
Bank name for manual repayments.
string
Account number for manual repayments.
string
Account name for manual repayments.
boolean
Whether the loan is fully repaid.
string
Currency code.
array
List of all installments with payment details.
Show paymentHistory array item (InstallmentDto)
Show paymentHistory array item (InstallmentDto)
number
Installment number (1, 2, 3, etc.).
string
Due date for this installment.
number
Total installment amount (principal + interest + fees).
number
Principal amount for this installment.
number
Interest amount for this installment.
number
Fees amount for this installment.
number
Penalty amount (if any).
number
Amount paid for this installment.
number
Outstanding amount for this installment.
string
Payment status (e.g.,
PENDING, PAID, PARTIAL, OVERDUE).string
Date when payment was made (if paid).
number
Number of days overdue (if applicable).
Code Examples
curl --location 'https://{your-domain}.fincode.software/api/v1/services/user/loan-details-with-payment-history/123e4567-e89b-12d3-a456-426614174000' \
--header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
--header 'x-idempotency-key: unique-key-12345' \
--header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
--header 'x-fapi-customer-ip-address: 192.168.1.1' \
--header 'x-fapi-interaction-id: interaction-12345'
const axios = require('axios');
const BASE_URL = 'https://{your-domain}.fincode.software/api/v1/services/user';
async function getLoanDetailsWithPaymentHistory(accessToken, loanApplicationId) {
try {
const response = await axios.get(
`${BASE_URL}/loan-details-with-payment-history/${loanApplicationId}`,
{
headers: {
'X-Auth-Token': accessToken,
'x-idempotency-key': `key-${Date.now()}`,
'x-fapi-auth-date': new Date().toISOString(),
'x-fapi-customer-ip-address': '192.168.1.1',
'x-fapi-interaction-id': `interaction-${Date.now()}`,
},
}
);
const loanDetails = response.data.data;
console.log('Loan Details:');
console.log(`- Application ID: ${loanDetails.loanApplicationId}`);
console.log(`- Product: ${loanDetails.loanProductName}`);
console.log(`- Total Installments: ${loanDetails.totalInstallments}`);
console.log(`- Installments Paid: ${loanDetails.installmentsPaid}`);
console.log(`- Total Balance: ${loanDetails.totalBalance}`);
console.log(`- Next Payment Due: ${loanDetails.nextPaymentDueDate}`);
console.log('\nInstallment Schedule:');
loanDetails.paymentHistory.forEach((installment) => {
console.log(
`Installment ${installment.installmentNumber}: ` +
`${installment.installmentAmount} due ${installment.dueDate} ` +
`(Status: ${installment.paymentStatus})`
);
});
return loanDetails;
} catch (error) {
console.error(
'Failed to fetch loan details:',
error.response?.data || error.message
);
throw error;
}
}
// Usage Example
const accessToken = 'YOUR_JWT_ACCESS_TOKEN';
const loanApplicationId = '123e4567-e89b-12d3-a456-426614174000';
getLoanDetailsWithPaymentHistory(accessToken, loanApplicationId);
⌘I
