Home/API/Loan Payment

API Endpoint

Loan Payment

Calculate fixed monthly payment for a loan given amount, rate, and term.

Endpoint

POST https://likeoptions.com/api/v1/calculate/loan

Also supports GET with query parameters.

Parameters

ParameterTypeDefaultDescription
amountnumber—Loan amount ($)
annualRatenumber—Annual interest rate (%)
monthsnumber—Loan term (months)

Request Examples

POST (JSON body)
curl -X POST https://likeoptions.com/api/v1/calculate/loan \ -H "Content-Type: application/json" \ -d '{"amount": 100000, "annualRate": 50000, "months": 6}'
GET (query parameters)
curl "https://likeoptions.com/api/v1/calculate/loan?amount=100000&annualRate=50000&months=6"

Response

{ "kind": "loan", "result": { "primary": 1234.56, "secondary": [ { "label": "Example metric", "value": 100, "format": "money" }, { "label": "Example percent", "value": 5.5, "format": "percent" } ] } }

When to Use

  • Calculate auto loan payment
  • Estimate personal loan cost
  • Compare loan offers

Error Handling

  • 400 Bad Request — Invalid input parameters or missing required fields
  • 404 Not Found — Unknown calculator kind
  • 429 Too Many Requests — Rate limit exceeded (120 req/hour per IP)
  • 413 Payload Too Large — Request body exceeds 16 KB

Related Endpoints

View request examples in JavaScript, Python, cURL, and more →