https://{your-domain}.fincode.software/api/v1/services/user/repaid-transactions/{user-id}
{
"status": "<string>",
"data": [
{
"repaymentId": "<string>",
"loanApplicationId": "<string>",
"repaymentAmount": 123,
"paymentDate": "<string>",
"paymentMethod": "<string>",
"status": "<string>"
}
]
}API Endpoints
Repaid Transactions
Retrieves a list of all repaid transactions for a user.
GET
/
api
/
v1
/
services
/
user
/
repaid-transactions
/
{user-id}
https://{your-domain}.fincode.software/api/v1/services/user/repaid-transactions/{user-id}
{
"status": "<string>",
"data": [
{
"repaymentId": "<string>",
"loanApplicationId": "<string>",
"repaymentAmount": 123,
"paymentDate": "<string>",
"paymentMethod": "<string>",
"status": "<string>"
}
]
}Fetches all repayment transactions that have been completed by the user across all their loans.
https://{your-domain}.fincode.software/api/v1/services/user/repaid-transactions/{user-id}
Request Headers
Path Parameters
Response
Returns a list of all repaid transactions.Code Examples
curl --location 'https://{your-domain}.fincode.software/api/v1/services/user/repaid-transactions/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 getRepaidTransactions(accessToken, userId) {
try {
const response = await axios.get(
`${BASE_URL}/repaid-transactions/${userId}`,
{
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()}`,
},
}
);
return transactions;
} catch (error) {
console.error(
'Failed to fetch repaid transactions:',
error.response?.data || error.message
);
throw error;
}
}
