Developer API
Contract documentation for MortMe's country-aware mortgage calculation route.
POST /api/v1/mortgage/calculate/Endpoint status and base URL
The contract in this document is implemented by this Next application at POST /api/v1/mortgage/calculate/. In local development, use http://localhost:3000/api/v1/mortgage/calculate/. This build has NEXT_PUBLIC_SITE_URL configured as https://mortme.com, so the corresponding configured URL is https://mortme.com/api/v1/mortgage/calculate/. Configuring that variable supplies a base URL for links and examples; it does not by itself establish that an endpoint is deployed, publicly reachable, or suitable for production use.
Quick start
For a local application instance, send JSON with a supported country, loan principal, annual rate, and term. Omit paymentFrequency to use monthly. For another environment, replace only the local origin after confirming its route is deployed and reachable.
Minimal request
Minimal response
A successful response is HTTP 200. This abbreviated example shows fields returned by the route; values depend on your inputs.
Full request schema
This is the request contract, not a lender application schema. Only send countryInputs that apply to the selected country. Lump sums may use paymentNumber or date (YYYY-MM-DD), not both.
Full response schema
This is the response contract for a successful route call. The schedule is intentionally not returned. countrySpecific always has US, AU, CA, and UK keys; non-selected models are null.
Supported countries
- US: user-provided PMI monthly amount.
- Australia: offset, redraw, and LMI estimate concepts.
- Canada: contract term, nominal semi-annual rate convention, and qualifying-rate model.
- UK: initial deal period and repayment-strategy context.
Validation & limitations
- Request bodies over 32 KiB are rejected. Money values must be 0–100,000,000; terms must be 1–1200 months; at most 24 lump sums are accepted.
- Unsupported countries, country/payment-frequency combinations, and inapplicable country inputs return HTTP 400.
- Error responses use
{ "apiVersion": "v1", "error": { "code": "...", "message": "..." } }. Validation errors can also includeerror.details.fields. - Production operators are responsible for configuring an appropriate distributed, atomic rate-limit adapter. A limited request returns HTTP 429 and may include
Retry-After. - Production operators are responsible for CORS configuration appropriate to their environment. Errors do not include stack traces or submitted financial inputs.
Compliance & disclaimers
Results are calculations from submitted inputs and country-specific model assumptions. Present them as estimates: lender terms, payment timing, rounding, taxes, insurance, and program requirements can differ. MortMe is not a lender and this API must not be used to determine approval, eligibility, or a binding credit decision.
Need an embedded calculator?
Use the iframe integration when you do not need a custom interface.