JavaScript Finance Calculator
There is a client-side Javascript reusable object for calculating the details of a finance deal for display on your website.
Script Source URL | |
---|---|
Live | |
Test |
To use it, simply include and configure this snippet of HTML between your website’s head elements:
<!-- You must include your merchant API key for the corresponding environment.
This can be found in the integration tab of your merchant backoffice account -->
<script type="text/javascript"src="https://test.dekopay.com/js_api/FinanceDetails.js.php?api_key=[YOUR API KEY]"></script>
<!-- product code is a string, the codes for each finance product can be found
on your rate card. The test rate card may differ from the live rate card and is
representative. All price fields have values in Pounds, for example 123.45. Deposit
percentage is the percentage of the full price that the deposit represents for
example 25 = 25% deposit -->
<script type="text/javascript">
var my_fd_obj = new FinanceDetails("[PRODUCT CODE]", [GOODS PRICE], [DEPOSIT PERCENTAGE], [DEPOSIT AMOUNT]);
</script>
This table shows the properties of your FinanceDetails object and some example values:
Property Name | Property | Example Value |
Product Name | my_fd_obj.p_name | 6 Months Interest Free Credit (0% APR) |
Value of Goods | my_fd_obj.goods_val | 500.00 |
Percentage of Deposit | my_fd_obj.d_pc | 10.00 |
Amount of Deposit | my_fd_obj.d_amount | 50.00 |
Amount of Loan | my_fd_obj.l_amount | 450.00 |
Term of Agreement | my_fd_obj.term | 6 |
APR | my_fd_obj.apr | 0 |
Monthly Instalment | my_fd_obj.m_inst | 75.00 |
Loan Repayment | my_fd_obj.l_repay | 450.00 |
Total Amount Payable | my_fd_obj.total | 500.00 |
Cost of Loan | my_fd_obj.l_cost | 0.00 |
True Cost of Loan | My_fd_obj.l_truecost | 0.00 |
The below wording will need to be added to the Finance Calculator
- This is to inform customers that there is a minor discrepancy in the calculations.
“ Please note that, due to calculations, your monthly repayment may differ very slightly from what you were expecting. Please check your monthly repayment figure before proceeding ”
- There needs to be a Rep APR added onto the Interest bearing products. This Rep APR will need to represent more than half of the finance offers your customers will be accepted.
Please note: This Rep APR will need to be as prominent as any incentives or Monthly payment amount shown on the page.Example below:
Representative Example:
Cash price £x, Deposit £x, Total amount of credit £xxx over 12 months with an annual interest rate of 14.9%. Monthly repayments will be £x with a total repayable of £x. 14.9% APR representative.
Please note that the True Cost of Loan should not be displayed on your website or otherwise communicated to the consumer. It exists to show when rounding is in the consumers favour.
Use Cost of Loan.
A demonstration of the JavaScript finance calculator tool is available at
https://test.dekopay.com/js_api/index.php
Updated about 1 month ago