Vehicle Payments
Calculate monthly payments, financing options, and payment estimates
GET Request
~250ms response
1 credit per request
Endpoint
GET https://api.carapi.dev/v1/payments/{vin}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| vin | string | Required | 17-character Vehicle Identification Number |
| price | number | Required | Vehicle price (> 0) |
| downPayment | number | Required | Down payment amount (≥ 0, must be lower than price) |
| loanTerm | number | Required | Loan term in months (integer, 1-600) |
| interestRate | number | Required | Annual interest rate as percentage (0-100) |
| currency | string | Optional | Target currency (default: EUR) |
| token | string | Required | API authentication token (query parameter) |
Request Examples
cURL
curl -X GET \
"https://api.carapi.dev/v1/payments/JHMZE2H79AS019110?price=25000&downPayment=5000&loanTerm=60&interestRate=4.5&token=YOUR_API_KEY"JavaScript
// Using fetch API
const response = await fetch('https://api.carapi.dev/v1/payments/JHMZE2H79AS019110?price=25000&downPayment=5000&loanTerm=60&interestRate=4.5&token=YOUR_API_KEY', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);Python
import requests
url = "https://api.carapi.dev/v1/payments/JHMZE2H79AS019110"
params = {
"price": "25000",
"downPayment": "5000",
"loanTerm": "60",
"interestRate": "4.5",
"token": "YOUR_API_KEY"
}
response = requests.get(url, params=params)
data = response.json()
print(data)Response Examples
Success Response (200)
{
"vin": "JHMZE2H79AS019110",
"payments": [
{
"amount": 5000,
"currency": "EUR",
"frequency": "one-time",
"type": "down-payment",
"description": "Initial down payment",
"dueDate": "2025-09-12"
},
{
"amount": 372,
"currency": "EUR",
"frequency": "monthly",
"type": "loan",
"description": "Monthly loan payment 1/60",
"dueDate": "2025-10-15"
},
{
"amount": 372,
"currency": "EUR",
"frequency": "monthly",
"type": "loan",
"description": "Monthly loan payment 2/60",
"dueDate": "2025-11-15"
},
// ... 58 more monthly payments
],
"loanAmount": 20000,
"totalPaid": 27320,
"totalInterest": 2320,
"monthlyPayment": 372,
"currency": "EUR"
}Error Response - Missing Parameters (400)
{
"error": "Missing or invalid required parameter: price"
}Error Response - Vehicle Not Found (404)
{
"error": "Vehicle not found"
}Response Fields
| Field | Type | Description |
|---|---|---|
| vin | string | Vehicle Identification Number |
| payments | array | Array of payment objects with detailed payment schedule |
| payments[].amount | number | Payment amount |
| payments[].currency | string | Payment currency |
| payments[].frequency | string | Payment frequency (one-time, monthly, etc.) |
| payments[].type | string | Payment type (down-payment, loan) |
| payments[].description | string | Human-readable payment description |
| payments[].dueDate | string | Payment due date (YYYY-MM-DD format) |
| loanAmount | number | Total amount financed (price - down payment) |
| totalPaid | number | Total amount paid over the full loan period |
| totalInterest | number | Total interest paid over the loan period |
| monthlyPayment | number | Monthly payment amount |
| currency | string | Currency for all monetary values |
Payment Calculation Formula
Standard Loan Payment Formula
Monthly Payment = L × [r(1+r)^n] / [(1+r)^n - 1]Where:
- • L = Loan amount (vehicle price - down payment)
- • r = Monthly interest rate (annual rate / 12)
- • n = Number of monthly payments (loan term)
Special cases:
- • If interest rate = 0%, monthly payment = loan amount / loan term
- • Down payment must be lower than vehicle price — there must be an amount left to finance, otherwise the request is rejected with 400
Error Codes
400
Bad Request
Invalid VIN format, missing required parameters, or invalid parameter values
403
Forbidden
Invalid or missing API token
404
Not Found
Vehicle not found or no current price available
500
Internal Server Error
Server encountered an error processing the request
Supported Currencies
EUR (Euro)
GBP (British Pound)
CZK (Czech Koruna)
PLN (Polish Złoty)
HUF (Hungarian Forint)
+ More via API
Important Notes
- •VIN must be exactly 17 characters long and contain only alphanumeric characters (except I, O, and Q)
- •Returns a detailed payment schedule with all individual payments and due dates
- •Includes one down payment (due immediately) plus all monthly loan payments
- •All monetary values are rounded to 2 decimal places
- •Due dates are calculated starting from today (down payment) and 15th of each month (loan payments)
- •Each successful request consumes 1 API credit from your monthly allowance
- •Response data is cached for improved performance