Financial Hub · Calculation
Financial Hub tracked debt portfolio
Sum active tracked debts, planned monthly payments and interest saved versus known minimums. Returns a debt-free date when all remaining schedules reach zero.
Visitors can explore a sample snapshot. Saved accounts, loans and properties open within the member’s own Financial Hub.
Example result · totalBalance: 500 See output
- Cost per success
- 1 calculation credit
- Production plans
- Standard, Business, Scale, Enterprise
Plan allowances - Free sandbox
- Not available
Integration example
Make a request
Use a production key scoped to financial-hub-tracked-debt-portfolio.
Keep the key on your server. A successful call uses 1 calculation credit.
Set HT_PRODUCTION_KEY on your server. Save as example.mjs and run node example.mjs with Node.js 18 or later.
import { randomUUID } from "node:crypto";
const key = process.env.HT_PRODUCTION_KEY;
if (!key) throw new Error("Set HT_PRODUCTION_KEY on your server.");
const endpoint = "https://calc.hasstechapi.com/v2/calc/financial-hub-tracked-debt-portfolio";
const input = {
"today": "2026-01-01",
"debts": [
{
"id": "sample",
"debtType": "auto",
"balance": 500,
"regularApr": 0,
"monthlyPayment": 100,
"dueDay": 1,
"startBalance": 500,
"startedOn": "2026-01-01",
"minimumPayment": 50
},
{
"id": "closed",
"debtType": "auto",
"balance": 500,
"regularApr": 0,
"monthlyPayment": 100,
"dueDay": 1,
"startBalance": 500,
"startedOn": "2026-01-01",
"minimumPayment": 50,
"closedOn": "2026-01-01"
}
]
};
const requestId = process.env.HT_REQUEST_ID || Date.now() + "." + randomUUID();
// Keep this ID to look up usage if the connection is interrupted.
console.error("Usage lookup ID:", requestId);
const response = await fetch(endpoint, {
method: "POST",
redirect: "error",
headers: {
"Authorization": "Bearer " + key,
"Content-Type": "application/json",
"Idempotency-Key": requestId
},
body: JSON.stringify(input)
});
if (!response.ok) {
const problem = await response.json().catch(() => null);
const code = problem?.error?.code || response.statusText;
const delay = response.headers.get("retry-after");
if (delay) console.error("Retry-After (seconds):", delay);
console.error("HTTP " + response.status + " " + code + ". Usage lookup ID: " + requestId);
if (Array.isArray(problem?.error?.details)) {
for (const issue of problem.error.details) console.error("Input issue:", JSON.stringify(issue));
}
process.exitCode = 1;
} else {
console.log(JSON.stringify(await response.json(), null, 2));
} cURL (shell)
(
set -eu
: "${HT_PRODUCTION_KEY:?Set HT_PRODUCTION_KEY on your server}"
request_id="${HT_REQUEST_ID:-}"
if [ -z "$request_id" ]; then
request_id=$(python3 -c 'import time, uuid; print(str(time.time_ns() // 1000000) + "." + str(uuid.uuid4()))')
fi
printf 'Usage lookup ID: %s\n' "$request_id" >&2
# On INVALID_INPUT, read error.details in the JSON response body.
curl --disable --silent --show-error --fail-with-body --include \
--request POST 'https://calc.hasstechapi.com/v2/calc/financial-hub-tracked-debt-portfolio' \
--header "Authorization: Bearer $HT_PRODUCTION_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $request_id" \
--data-binary @- <<'HT_INPUT'
{
"today": "2026-01-01",
"debts": [
{
"id": "sample",
"debtType": "auto",
"balance": 500,
"regularApr": 0,
"monthlyPayment": 100,
"dueDay": 1,
"startBalance": 500,
"startedOn": "2026-01-01",
"minimumPayment": 50
},
{
"id": "closed",
"debtType": "auto",
"balance": 500,
"regularApr": 0,
"monthlyPayment": 100,
"dueDay": 1,
"startBalance": 500,
"startedOn": "2026-01-01",
"minimumPayment": 50,
"closedOn": "2026-01-01"
}
]
}
HT_INPUT
) If your request fails
400 INVALID_INPUT-
Read
error.detailswhen present. Node prints each issue. cURL returns the JSON body. Eachpathpoints into your request. An empty path refers to the whole body.Check the accepted inputs for required fields, units and ranges. Send the corrected JSON as a new request.
401or403- Check that the server has the bearer key for the endpoint’s environment and that the key includes
financial-hub-tracked-debt-portfolio. 429- Read the service error code, check your allowance, and wait for the
Retry-Afterinterval when supplied before trying again. - Lost response,
409or503 - Open Request lookup, select the same environment and enter the printed usage lookup ID. A settled ID has already consumed credits. To retry the same calculation, set
HT_REQUEST_IDto the original ID and reuse the same inputs. A settled request does not return its result again. Unset the variable for a new request, which can consume credits.
The usage lookup ID is the Idempotency-Key your server sends. The response’s x-request-id identifies the HTTP exchange for support.
Output
Example result
These values come from running this operation on the example inputs.
totalBalance- 500
totalMonthlyPayments- 100
debtFreeOn- 2026-06-01
How to interpret this result
- Amounts use USD. The app checks up to 600 monthly periods per debt. Minimum-payment savings include only debts with a known, amortizing lower minimum.
Full example response (JSON)
{
"status": "available",
"result": {
"totalBalance": 500,
"totalMonthlyPayments": 100,
"debtFreeOn": "2026-06-01",
"interestSavedVsMinimum": 0,
"anyEstimated": false
},
"formulaVersion": "financial-hub-tracked-debt-portfolio-v1",
"units": {
"money": "USD"
},
"assumptions": [
"Amounts use USD. The app checks up to 600 monthly periods per debt. Minimum-payment savings include only debts with a known, amortizing lower minimum."
],
"warnings": [],
"creditCost": 1
}Request contract
Accepted inputs
Fields for this example. Expand the schema for all supported combinations and limits.
FieldType, units and limits
todayRequiredUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debtsRequireddebts[].idRequiredCaller-defined, nonidentifying key within this request.
Min length 1 · Max length 48debts[].debtTypeRequireddebts[].balanceRequiredNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].regularAprRequiredAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].monthlyPaymentRequiredNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].dueDayRequiredDay of month, clamped in short months.
Min 1 · Max 31debts[].startBalanceRequiredNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].startedOnRequiredUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].statementOnOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].confirmedThroughOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].minimumPaymentOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].promoAprOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].promoEndsOnOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].closedOnOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].balanceSourceOptionaldebts[].mortgageOptionaldebts[].mortgage.kindRequireddebts[].mortgage.structureRequireddebts[].mortgage.total_paymentRequiredNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.includes_escrowRequireddebts[].mortgage.pi_paymentRequiredNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.tax_monthlyOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.insurance_monthlyOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.mi_monthlyOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.extra_principalOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.biweeklyOptionaldebts[].mortgage.original_amountOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.original_valueOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.first_payment_onOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].mortgage.term_monthsOptionalMonths.
Min 1 · Max 600debts[].mortgage.original_rateOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.maturity_onOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].mortgage.fha_ltv_at_most_90Optionaldebts[].mortgage.fha_case_assigned_onOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].mortgage.io_ends_onOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].mortgage.draw_ends_onOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].mortgage.repay_monthsOptionalMonths.
Min 1 · Max 600debts[].mortgage.credit_limitOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000debts[].mortgage.armOptionaldebts[].mortgage.arm.productOptionaldebts[].mortgage.arm.next_change_onRequiredUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10debts[].mortgage.arm.adjust_every_monthsOptionalMonths between adjustments.
Min 1 · Max 120debts[].mortgage.arm.initial_capOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.arm.periodic_capOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.arm.lifetime_capOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.arm.marginOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.arm.index_valueOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.arm.floor_rateOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.arm.initial_rateOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100debts[].mortgage.arm.adjusted_beforeOptionalExample request body (JSON)
{
"today": "2026-01-01",
"debts": [
{
"id": "sample",
"debtType": "auto",
"balance": 500,
"regularApr": 0,
"monthlyPayment": 100,
"dueDay": 1,
"startBalance": 500,
"startedOn": "2026-01-01",
"minimumPayment": 50
},
{
"id": "closed",
"debtType": "auto",
"balance": 500,
"regularApr": 0,
"monthlyPayment": 100,
"dueDay": 1,
"startBalance": 500,
"startedOn": "2026-01-01",
"minimumPayment": 50,
"closedOn": "2026-01-01"
}
]
} Full JSON schema
{
"type": "object",
"properties": {
"today": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"debts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 48,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "Caller-defined, nonidentifying key within this request."
},
"debtType": {
"type": "string",
"enum": [
"credit_card",
"auto",
"student",
"personal",
"mortgage",
"heloc",
"other"
]
},
"balance": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"regularApr": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"monthlyPayment": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"dueDay": {
"type": "integer",
"minimum": 1,
"maximum": 31,
"description": "Day of month, clamped in short months."
},
"startBalance": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"startedOn": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"statementOn": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"confirmedThrough": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"minimumPayment": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"promoApr": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"promoEndsOn": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"closedOn": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"balanceSource": {
"type": "string",
"enum": [
"entered",
"statement",
"check_in"
]
},
"mortgage": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"conventional",
"jumbo",
"fha",
"va",
"usda",
"second",
"heloc"
]
},
"structure": {
"type": "string",
"enum": [
"fixed",
"arm",
"interest_only",
"balloon"
]
},
"total_payment": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"includes_escrow": {
"type": "boolean"
},
"pi_payment": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"tax_monthly": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"insurance_monthly": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"mi_monthly": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"extra_principal": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"biweekly": {
"type": "boolean"
},
"original_amount": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"original_value": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"first_payment_on": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"term_months": {
"type": "integer",
"minimum": 1,
"maximum": 600,
"description": "Months."
},
"original_rate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"maturity_on": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"fha_ltv_at_most_90": {
"type": "boolean"
},
"fha_case_assigned_on": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"io_ends_on": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"draw_ends_on": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"repay_months": {
"type": "integer",
"minimum": 1,
"maximum": 600,
"description": "Months."
},
"credit_limit": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"arm": {
"type": "object",
"properties": {
"product": {
"type": "string",
"enum": [
"5/6",
"7/6",
"10/6",
"5/1",
"7/1",
"10/1",
"other"
]
},
"next_change_on": {
"type": "string",
"format": "date",
"minLength": 10,
"maxLength": 10,
"pattern": "^(19|20|21)[0-9]{2}-[0-9]{2}-[0-9]{2}$",
"description": "UTC calendar date (YYYY-MM-DD), 1900–2199."
},
"adjust_every_months": {
"type": "integer",
"minimum": 1,
"maximum": 120,
"description": "Months between adjustments."
},
"initial_cap": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"periodic_cap": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"lifetime_cap": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"margin": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"index_value": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"floor_rate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"initial_rate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"adjusted_before": {
"type": "boolean"
}
},
"required": [
"next_change_on"
],
"additionalProperties": false
}
},
"required": [
"kind",
"structure",
"total_payment",
"includes_escrow",
"pi_payment"
],
"additionalProperties": false
}
},
"required": [
"id",
"debtType",
"balance",
"regularApr",
"monthlyPayment",
"dueDay",
"startBalance",
"startedOn"
],
"additionalProperties": false,
"description": "Monthly US-dollar debt tracking inputs. Mortgage/HELOC may include the app detail shape. pi_payment excludes escrow and insurance."
},
"minItems": 0,
"maxItems": 12
}
},
"required": [
"today",
"debts"
],
"additionalProperties": false
}Production endpoint: POST https://calc.hasstechapi.com/v2/calc/financial-hub-tracked-debt-portfolio
Formula: financial-hub-tracked-debt-portfolio-v1