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

ParameterTypeRequiredDescription
vinstringRequired17-character Vehicle Identification Number
pricenumberRequiredVehicle price (> 0)
downPaymentnumberRequiredDown payment amount (≥ 0, must be lower than price)
loanTermnumberRequiredLoan term in months (integer, 1-600)
interestRatenumberRequiredAnnual interest rate as percentage (0-100)
currencystringOptionalTarget currency (default: EUR)
tokenstringRequiredAPI 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

FieldTypeDescription
vinstringVehicle Identification Number
paymentsarrayArray of payment objects with detailed payment schedule
payments[].amountnumberPayment amount
payments[].currencystringPayment currency
payments[].frequencystringPayment frequency (one-time, monthly, etc.)
payments[].typestringPayment type (down-payment, loan)
payments[].descriptionstringHuman-readable payment description
payments[].dueDatestringPayment due date (YYYY-MM-DD format)
loanAmountnumberTotal amount financed (price - down payment)
totalPaidnumberTotal amount paid over the full loan period
totalInterestnumberTotal interest paid over the loan period
monthlyPaymentnumberMonthly payment amount
currencystringCurrency 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