https://{your-domain}.fincode.software/api/v1/services/user/list-customer-repayments/{customer-id}
{
"status": "<string>",
"data": [
{
"id": "<string>",
"loanRepaymentMethodEnum": "<string>",
"accountProductName": "<string>",
"customerName": "<string>",
"email": "<string>",
"repaymentAmount": 123,
"loanProductName": "<string>",
"principalBalance": 123,
"totalBalance": 123,
"loanAmountPaid": true,
"creationDate": "<string>",
"paymentDueDate": "<string>",
"installmentCount": 123,
"accountId": "<string>",
"loanApplicationId": "<string>",
"totalPayable": 123
}
]
}API Endpoints
List Customer Repayments
Retrieves a list of all repayments for a specific customer across all their loans.
GET
/
api
/
v1
/
services
/
user
/
list-customer-repayments
/
{customer-id}
https://{your-domain}.fincode.software/api/v1/services/user/list-customer-repayments/{customer-id}
{
"status": "<string>",
"data": [
{
"id": "<string>",
"loanRepaymentMethodEnum": "<string>",
"accountProductName": "<string>",
"customerName": "<string>",
"email": "<string>",
"repaymentAmount": 123,
"loanProductName": "<string>",
"principalBalance": 123,
"totalBalance": 123,
"loanAmountPaid": true,
"creationDate": "<string>",
"paymentDueDate": "<string>",
"installmentCount": 123,
"accountId": "<string>",
"loanApplicationId": "<string>",
"totalPayable": 123
}
]
}Fetches all repayment records associated with a customer, providing details about each repayment including amounts, due dates, installment information, and balances.
https://{your-domain}.fincode.software/api/v1/services/user/list-customer-repayments/{customer-id}
Request Headers
string
required
The JWT Access Token obtained from the
/login or /refresh-token endpoint.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 customer whose repayments to retrieve.
Response
Returns a list of all repayments for the customer.string
default:"SUCCESS"
Overall status of the API request.
array
List of repayment records.
Show data array item
Show data array item
string
Unique identifier of the repayment record.
string
Repayment method (e.g.,
External Bank Transfer, Internal Bank Transfer).string
Name of the account product.
string
Name of the customer.
string
Customer’s email address.
number
Amount of the repayment.
string
Name of the loan product.
number
Outstanding principal balance.
number
Total outstanding balance.
boolean
Whether the loan amount has been fully paid.
string
Date when the repayment record was created.
string
Date when the payment is due.
number
Installment number for this repayment.
string
Unique identifier of the loan account.
string
Unique identifier of the loan application.
number
Total amount payable for this repayment.
Code Examples
curl --location 'https://{your-domain}.fincode.software/api/v1/services/user/list-customer-repayments/123e4567-e89b-12d3-a456-426614174000' \
--header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
--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 getCustomerRepayments(accessToken, customerId) {
try {
const response = await axios.get(
`${BASE_URL}/list-customer-repayments/${customerId}`,
{
headers: {
'X-Auth-Token': accessToken,
'x-fapi-auth-date': new Date().toISOString(),
'x-fapi-customer-ip-address': '192.168.1.1',
'x-fapi-interaction-id': `interaction-${Date.now()}`,
},
}
);
console.log(`Found ${response.data.data.length} repayments:`);
response.data.data.forEach((repayment) => {
console.log(
`- ${repayment.loanProductName}: ${repayment.repaymentAmount} ` +
`(Due: ${repayment.paymentDueDate}, Installment: ${repayment.installmentCount})`
);
});
return response.data.data;
} catch (error) {
console.error(
'Failed to fetch customer repayments:',
error.response?.data || error.message
);
throw error;
}
}
// Usage Example
const accessToken = 'YOUR_JWT_ACCESS_TOKEN';
const customerId = '123e4567-e89b-12d3-a456-426614174000';
getCustomerRepayments(accessToken, customerId);
