Members
generateContract
Generate the contract for a loan
Example
generateContract({
borrower: {
"borrower_address": "Unit B, 2/F, 38 Shing Wo Road, Repulse Bay",
"borrower_firstname": "Dabra",
"borrower_lastname": "Rodriguez Casa",
"borrower_unique_number": "WX555555(6)",
"custom_field_3012": "hk_wx5555556"
},
loan: {
"loan_application_id": "1000016",
"loan_duration": 12,
"loan_interest": "2.6600",
"loan_principal_amount": "13000.00",
"loan_released_date": "30/10/2019",
"custom_field_1757": "48.00",
"custom_field_2416": "Thirteen Thousand",
"custom_field_2864": "2000"
},
loanSchedules: [
{
"Date": "08/11/2019",
"Due": "1,429.13",
},
{
"Date": "08/12/2019",
"Due": "1,429.17",
}
]
});
saveContract
Export the contract pdf to Firebase storage
Example
saveContract({
borrower: {
"borrower_address": "Unit B, 2/F, 38 Shing Wo Road, Repulse Bay",
"borrower_firstname": "Dabra",
"borrower_lastname": "Rodriguez Casa",
"borrower_unique_number": "WX555555(6)",
"custom_field_3012": "hk_wx5555556"
},
loan: {
"loan_application_id": "1000016",
"loan_duration": 12,
"loan_interest": "2.6600",
"loan_principal_amount": "13000.00",
"loan_released_date": "30/10/2019",
"custom_field_1757": "48.00",
"custom_field_2416": "Thirteen Thousand",
"custom_field_2864": "2000"
},
loanSchedules: [
{
"Date": "08/11/2019",
"Due": "1,429.13",
},
{
"Date": "08/12/2019",
"Due": "1,429.17",
}
]
});
Type Definitions
borrower
Properties:
| Name | Type | Description |
|---|---|---|
borrower_address |
string | Borrower’s address |
borrower_firstname |
string | Borrower’s first name |
borrower_lastname |
string | Borrower’s middle and last name |
borrower_unique_number |
string | Borrower’s HKID number |
custom_field_3012 |
string | Borrower’s Firebase UID |
Borrower-related data from Loandisk
Type:
- Object
Example
{
"borrower_address": "Unit B, 2/F, 38 Shing Wo Road, Repulse Bay",
"borrower_firstname": "Dabra",
"borrower_lastname": "Rodriguez Casa",
"borrower_unique_number": "WX555555(6)",
"custom_field_3012": "hk_wx5555556"
}
loan
Properties:
| Name | Type | Description |
|---|---|---|
loan_application_id |
string | Loan’s Loan number |
loan_duration |
number | Loan’s duration in month |
loan_interest |
string | Loan’s interest rate in percentage form |
loan_principal_amount |
string | Loan’s principal |
loan_released_date |
string | Loans’s release date |
custom_field_1757 |
string | Loan’s APR (effective rate) |
custom_field_2416 |
string | Loan’s principal in written form |
custom_field_2864 |
string | Loan’s collected collateral amount |
Loan-related data from Loandisk
Type:
- Object
Example
{
"loan_application_id": "1000016",
"loan_duration": 12,
"loan_interest": "2.6600",
"loan_principal_amount": "13000.00",
"loan_released_date": "30/10/2019",
"custom_field_1757": "48.00",
"custom_field_2416": "Thirteen Thousand",
"custom_field_2864": "2000"
}
loanSchedules
Properties:
| Name | Type | Description |
|---|---|---|
loanSchedule |
Array.<object> | A scheduled repayment |
loanSchedule[].Date |
string | Date of the scheduled repayment |
loanSchedule[].Due |
string | Amount due on the scheduled repayment |
Original loan schedule of the loan with only repayment and maturity.
Type:
- array
Example
[
{
"Date": "08/11/2019",
"Due": "1,429.13",
},
{
"Date": "08/12/2019",
"Due": "1,429.17",
},
]