getcorefin / corefin Goto Github PK
View Code? Open in Web Editor NEWThe open-source lending infra
Home Page: https://corefin.com
License: MIT License
The open-source lending infra
Home Page: https://corefin.com
License: MIT License
curl --location 'http://localhost:8080/loans' \
--header 'Content-Type: application/json' \
--data '{
"term": 4,
"originatedAmount": 100.00,
"currency": "USD",
"targetInterestRate": 0.10,
"effectiveInterestRate": 0.10,
"externalReference": "orderId_12345",
"startDate": "2024-01-01",
"endDate": "2024-01-01",
"timezone": "America/Los_Angeles",
"region": "US",
"state": "CA"
}'
It should create a loan with the following installments:
"loanInstallments": [
{
"installmentId": "0",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 1,
"principalAmount": 24.67,
"interestAmount": 0.85,
"startDate": "2024-01-01",
"dueDate": "2024-02-01",
"endDate": "2024-01-31",
"status": "OWED"
},
{
"installmentId": "1",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 2,
"principalAmount": 24.92,
"interestAmount": 0.60,
"startDate": "2024-02-01",
"dueDate": "2024-03-01",
"endDate": "2024-02-29",
"status": "OWED"
},
{
"installmentId": "2",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 3,
"principalAmount": 25.09,
"interestAmount": 0.43,
"startDate": "2024-03-01",
"dueDate": "2024-04-01",
"endDate": "2024-03-31",
"status": "OWED"
},
{
"installmentId": "3",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 4,
"principalAmount": 25.32,
"interestAmount": 0.21,
"startDate": "2024-04-01",
"dueDate": "2024-05-01",
"endDate": "2024-04-30",
"status": "OWED"
}
]
curl --location 'http://localhost:8080/payments/97bcdb7f-5e09-43cb-a939-94cf881b13d9/makePayment' \
--header 'Content-Type: application/json' \
--data '{
"amount": "25.52",
"paymentType": "PAYMENT",
"paymentDateTime" : "2024-02-01T12:00:00Z"
}'
"loanInstallments": [
{
"installmentId": "1f68fb80-f0a6-11ee-81ba-0242ac140002",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 1,
"principalAmount": 24.67,
"interestAmount": 0.85,
"startDate": "2024-01-01",
"dueDate": "2024-02-01",
"endDate": "2024-04-01",
"status": "PAID"
},
{
"installmentId": "1f6af8a2-f0a6-11ee-81ba-0242ac140002",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 2,
"principalAmount": 25.12,
"interestAmount": 0.40,
"startDate": "2024-02-01",
"dueDate": "2024-03-01",
"endDate": "2024-04-01",
"status": "OWED"
},
{
"installmentId": "1f6c16c5-f0a6-11ee-81ba-0242ac140002",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 3,
"principalAmount": 25.31,
"interestAmount": 0.21,
"startDate": "2024-03-01",
"dueDate": "2024-04-01",
"endDate": "2024-04-01",
"status": "OWED"
},
{
"installmentId": "1f6d0dda-f0a6-11ee-81ba-0242ac140002",
"loanId": "97bcdb7f-5e09-43cb-a939-94cf881b13d9",
"numTerm": 4,
"principalAmount": 25.54,
"interestAmount": -0.01,
"startDate": "2024-04-01",
"dueDate": "2024-05-01",
"endDate": "2024-04-01",
"status": "OWED"
}
]
The startDate
and dueDate
for each installment are correct but the endDate
is incorrect.
I want to be able to query for the following reports:
I want to be able to configure a loan's terms, including the repayment period.
I want to be able to retrieve all payments that are due on a particular date.
Also, I'd like the option to get all payments that are delinquent or past due.
For the following loan configuration:
{
term: 6,
start_date: 01/01/2024,
interest_rate: 10%,
principal: $1000,
first_payment_date: 02/01/2024
}
The amortization schedule should be:
[
{
principal: 163.06,
interest: 8.49
},
{
principal: 164.90,
interest: 6.65
},
{
principal: 165.84,
interest: 5.71
},
{
principal: 167.39,
interest: 4.16
},
{
principal: 168.67,
interest: 2.88
},
{
principal: 170.14,
interest: 1.41
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.