Developer Resources
Integrate our calculator into your systems.
Embed the Calculator
Copy and paste the following code into your website to embed the calculator.
Calculator API
This document provides instructions on how to use the car finance calculator API.
Calculate Endpoint
- URL:
/api/calculate - Method:
POST - Content-Type:
application/json
Request Body
The request body must be a JSON object containing the following numeric fields:
carPrice: The total price of the car.downPayment: The initial amount paid upfront.loanTerm: The duration of the loan in months.interestRate: The annual interest rate in percent (e.g., 5.95).balloonPayment: The residual value of the car at the end of the loan term.setupFee: A one-time fee for setting up the loan.monthlyFee: The administrative fee charged each month.
Example Request:
{
"carPrice": 300000,
"downPayment": 60000,
"loanTerm": 36,
"interestRate": 5.95,
"balloonPayment": 150000,
"setupFee": 695,
"monthlyFee": 60
}Success Response
On a successful calculation, the API will return a JSON object with the following fields:
monthlyPayment: The calculated monthly payment, including the monthly fee.firstPayment: The first payment, which includes the monthly payment and the setup fee.totalInterest: The total amount of interest paid over the life of the loan.totalCost: The total cost of the loan, including principal, interest, and all fees.aprc: The Annual Percentage Rate of Charge (effective interest rate).principal: The initial loan amount (carPrice-downPayment).
Example Response:
{
"monthlyPayment": 2950.56,
"firstPayment": 3645.56,
"totalInterest": 31220.16,
"totalCost": 273380.16,
"aprc": 7.8,
"principal": 240000
}Error Response
If the request is malformed (e.g., missing fields, invalid JSON), the API will return a 400 Bad Request status with an error message.
Example Error:
{
"error": "Missing or invalid field: carPrice"
}