JavaScript Finance Calculator

❗️

The below wording will need to be added to the Finance Calculator in order to be compliant.

  1. 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

Missed or late payments will result in fees and additional interest on your loan and can also affect your credit file and your ability to obtain credit in the future.

(This is to inform customers that there is a minor discrepancy in the calculations and there will be additional charge due to missed or late payments)

  1. Representative Example:
    Cash price £x, Deposit £x, Total amount of credit £xxx over 12 months with an annual interest rate of X% (Fixed). Monthly repayments will be £x with a total repayable of £x. X% APR representative.

(There needs to be a Representative example added onto the Interest bearing products. This Representative example will need to represent more than half of the finance offers your customers will be accepted.

Please note: This Representative example will need to be as prominent as any incentives or Monthly payment amount shown on the page. )

  1. Credit is subject to status, UK only, 18+

  2. FCA Disclaimer - This will be the same disclaimer that would need to be added to the footer of your website.

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<script type="text/javascript"src="https://secure.dekopay.com/js_api/FinanceDetails.js.php?api_key=[YOUR LIVE API KEY]">
Test<script type="text/javascript"src="https://test.dekopay.com/js_api/FinanceDetails.js.php?api_key=[YOUR TEST API KEY]">

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>

Your Finance calculator must display the below fields, once they have been shown the total amount of the goods, the Deposit amount to choose from and the Finance product they wish to proceed with.

Finance Details
Total Cash Price
Deposit amount
Loan amount
Monthly Payment
Number of Payments
Total amount payable
Interest rate (Fixed)

This table shows the properties of your FinanceDetails object and some example values:

Property NamePropertyExample Value
Product Namemy_fd_obj.p_name6 Months Interest Free Credit (0% APR)
Value of Goodsmy_fd_obj.goods_val500.00
Percentage of Depositmy_fd_obj.d_pc10.00
Amount of Depositmy_fd_obj.d_amount50.00
Amount of Loanmy_fd_obj.l_amount450.00
Term of Agreementmy_fd_obj.term6
APRmy_fd_obj.apr0
Monthly Instalmentmy_fd_obj.m_inst75.00
Loan Repaymentmy_fd_obj.l_repay450.00
Total Amount Payablemy_fd_obj.total500.00
Cost of Loanmy_fd_obj.l_cost0.00
True Cost of LoanMy_fd_obj.l_truecost0.00

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 consumer's favour.
Use Cost of Loan.

A demonstration of the JavaScript finance calculator tool is available at
https://test.dekopay.com/js_api/index.php