API URL
GET /api/v1/mortgage-calculator/payment
Headers
Code
Content-Type: application/jsonQuery Parameters
Param
Type
Description
loan_amount
optional
number
Loan principal greater than zero
home_value
optional
number
Home value used with downpayment to derive loan principal
downpayment
optional
number
Down payment less than home_value
interest_rate
required
number
Annual interest rate percentage greater than 0 and at most 10000
duration_years
optional
number
Loan term greater than 0 and at most 50 years with default 30
monthly_extra_payment
optional
number
Additional monthly principal payment
monthly_hoa
optional
number
Monthly homeowners association amount
annual_property_tax
optional
number
Annual property tax amount
annual_home_insurance
optional
number
Annual home insurance amount
includeSchedule
optional
boolean
Include an amortization schedule when true
start_date
optional
string
Optional start date used for schedule entries
annual_appreciation_rate
optional
number
Annual appreciation rate from -100 through 100
current_loan_amount
optional
number
Existing refinance balance greater than zero
current_interest_rate
optional
number
Existing annual rate greater than 0 and at most 10000
current_remaining_years
optional
number
Existing term greater than 0 and at most 50 years
new_interest_rate
optional
number
Proposed annual rate greater than 0 and at most 10000
new_duration_years
optional
number
Proposed term greater than 0 and at most 50 years
refinance_cost
optional
number
Nonnegative refinance cost with default zero
Example GET Request
Code
GET https://datpaq.com/api/v1/mortgage-calculator/payment?api_key=your-api-key&loan_amount=350000&interest_rate=6.5&duration_years=30Successful Response
Status
HTML
200 OKBody
Code
{
"success": true,
"data": {
"monthly_loan_payment": 2212.24,
"monthly_escrow_estimate": 0,
"total_monthly_payment": 2212.24,
"total_interest_paid": 446405.71,
"total_loan_cost": 796405.71,
"early_payoff_months_saved": 0,
"interest_savings_with_extra_payment": 0
},
"metadata": {
"correlationId": "request-id",
"api_token_name": null,
"processingTime": "4ms",
"timestamp": "2026-10-11T12:00:00.000Z",
"rate_limit": null
}
}Field
Type
success
boolean
data
object
monthly_loan_payment
number
monthly_escrow_estimate
number
total_monthly_payment
number
total_interest_paid
number
total_loan_cost
number
early_payoff_months_saved
number
interest_savings_with_extra_payment
number
amortization_schedule
array
months_to_payoff
number
appreciation_projection
array
current_monthly_payment
number
new_monthly_payment
number
monthly_savings
number
break_even_months
number
total_cost_with_refinance
number
rate_30yr_fixed
object
rate_15yr_fixed
object
rate_5yr_arm
object
partial
boolean
errors
array
source
string
note
string
metadata
object
correlationId
string
processingTime
string
timestamp
string
api_token_name
string
rate_limit
object
available
boolean
feature
string
reason
string
error
string
Error Response
Example
Code
HTTP 400 ValidationError: Missing or invalid calculation input — Returned when a calculation parameter is missing or outside accepted constraints; HTTP 401 Unauthorized: Missing or invalid API key at the gateway — Returned when gateway authentication fails; HTTP 404 NotFound: Request path is not recognized — Service returns an endpoint-not-found response; HTTP 429 RateLimited: Request volume exceeds the configured per-IP window — Returned after the API rate limit is exceeded; HTTP 500 InternalError: Metrics generation or an unhandled service error fails — Metrics generation returns an empty 500 response; other unhandled errors use standardized error handling; HTTP 502 UpstreamError: All FRED series requests fail or return unusable data — Returned when no rate observation can be retrieved; HTTP 503 FeatureGated: /current-rates is called without FRED_API_KEY — Returns available=false while calculation endpoints remain availableLast Updated: May 4, 2026