Financial Hub · Calculation
Financial Hub dated debt schedule
Return the scheduled and recorded debt ledger rows, including payment splits, interest conventions, missed payments and effective rate cutoffs.
Visitors can explore a sample snapshot. Saved accounts, loans and properties open within the member’s own Financial Hub.
Example result · projectedThroughDate: 2026-03-01 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-debt-schedule.
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-debt-schedule";
const input = {
"asOfDate": "2026-03-01",
"currency": "USD",
"ledger": {
"account": {
"id": "loan",
"accountClass": "liability",
"accountType": "auto_loan",
"calculationModel": "fixed_amortizing",
"ownershipPercentage": 100
},
"observations": [
{
"id": "a",
"observedOn": "2026-01-01",
"value": 1000,
"valueKind": "verified"
}
],
"terms": [
{
"version": 1,
"effectiveFrom": "2026-01-01",
"rateType": "fixed",
"annualRate": 12,
"paymentFrequency": "monthly",
"scheduledPayment": 100,
"dueDay": 1
}
],
"events": [
{
"occurredOn": "2026-02-01",
"eventType": "missed_payment",
"idempotencyKey": "missed-Feb"
}
]
}
};
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-debt-schedule' \
--header "Authorization: Bearer $HT_PRODUCTION_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $request_id" \
--data-binary @- <<'HT_INPUT'
{
"asOfDate": "2026-03-01",
"currency": "USD",
"ledger": {
"account": {
"id": "loan",
"accountClass": "liability",
"accountType": "auto_loan",
"calculationModel": "fixed_amortizing",
"ownershipPercentage": 100
},
"observations": [
{
"id": "a",
"observedOn": "2026-01-01",
"value": 1000,
"valueKind": "verified"
}
],
"terms": [
{
"version": 1,
"effectiveFrom": "2026-01-01",
"rateType": "fixed",
"annualRate": 12,
"paymentFrequency": "monthly",
"scheduledPayment": 100,
"dueDay": 1
}
],
"events": [
{
"occurredOn": "2026-02-01",
"eventType": "missed_payment",
"idempotencyKey": "missed-Feb"
}
]
}
}
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-debt-schedule. 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.
projectedThroughDate- 2026-03-01
anchor.id- a
anchor.observedOn- 2026-01-01
Result warnings
- A missed scheduled payment caused unpaid interest to be added to the balance.
How to interpret this result
- Rows retain engine precision. A dated event or target can produce a row in addition to scheduled due dates.
Full example response (JSON)
{
"status": "available",
"result": {
"rows": [
{
"date": "2026-02-01",
"interest": 10,
"payment": 0,
"principal": 0,
"balance": 1010,
"recorded": true,
"missed": true
},
{
"date": "2026-03-01",
"interest": 10.1,
"payment": 100,
"principal": 89.9,
"balance": 920.1,
"recorded": false,
"missed": false
}
],
"warnings": [
{
"code": "negative_amortization",
"message": "A missed scheduled payment caused unpaid interest to be added to the balance."
}
],
"projectedThroughDate": "2026-03-01",
"anchor": {
"id": "a",
"observedOn": "2026-01-01",
"value": 1000,
"valueKind": "verified",
"accountId": "loan",
"currency": "USD",
"source": "manual"
}
},
"formulaVersion": "financial-hub-debt-schedule-v1",
"units": {
"money": "currency major units"
},
"assumptions": [
"Rows retain engine precision. A dated event or target can produce a row in addition to scheduled due dates."
],
"warnings": [
"A missed scheduled payment caused unpaid interest to be added to the balance."
],
"creditCost": 1
}Request contract
Accepted inputs
Fields for this example. Expand the schema for all supported combinations and limits.
FieldType, units and limits
asOfDateRequiredUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10currencyRequiredOne supported currency per request. The app rounds JPY to 0 decimals, BHD/JOD/KWD/OMR to 3 and the remaining supported codes to 2. No FX conversion.
Allowed: "USD", "CAD", "EUR", "GBP", "AUD", "NZD", "CHF", "CNY", "INR", "BRL", "MXN", "JPY", "BHD", "JOD", "KWD", "OMR"ledgerRequiredSingle account history. Supply an observation on or before the snapshot date; raw account projection preserves the engine warning for earlier dates.
ledger.accountRequiredCaller supplies the model. Ownership defaults to 100%; used in the snapshot only.
ledger.account.idRequiredCaller-defined, nonidentifying key within this request.
Min length 1 · Max length 48ledger.account.accountTypeRequiredledger.account.accountClassRequiredledger.account.calculationModelRequiredledger.account.ownershipPercentageOptionalPercentage points from 0 through 100.
Min 0 · Max 100ledger.observationsRequiredledger.observations[].idRequiredCaller-defined, nonidentifying key within this request.
Min length 1 · Max length 48ledger.observations[].observedOnRequiredUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.observations[].valueRequiredNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000ledger.observations[].valueKindRequiredledger.observations[].supersedesIdOptionalCaller-defined, nonidentifying key within this request.
Min length 1 · Max length 48ledger.termsOptionalledger.terms[].versionRequiredEffective term revision number.
Min 1 · Max 100000ledger.terms[].effectiveFromRequiredUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.terms[].effectiveToOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.terms[].rateTypeRequiredledger.terms[].rateBasisOptionalledger.terms[].annualRateOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100ledger.terms[].interestConventionOptionalledger.terms[].compoundingFrequencyOptionalledger.terms[].paymentFrequencyOptionalledger.terms[].scheduledPaymentOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000ledger.terms[].minimumPaymentOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000ledger.terms[].maturityDateOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.terms[].dueDayOptionalDay of month; clamped in short months.
Min 1 · Max 31ledger.terms[].promotionalRateExpiresOnOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.terms[].armNextResetOnOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.terms[].interestOnlyUntilOptionalUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.eventsOptionalledger.events[].idempotencyKeyRequiredCaller-defined, nonidentifying key within this request.
Min length 1 · Max length 48ledger.events[].occurredOnRequiredUTC calendar date (YYYY-MM-DD), 1900–2199.
Format: date · Min length 10 · Max length 10ledger.events[].eventTypeRequiredledger.events[].amountOptionalSigned amount in currency major units; a correction may decrease the balance.
Min -1000000000000 · Max 1000000000000ledger.events[].newRateOptionalAnnual rate as percentage points (6.5 means 6.5%).
Min 0 · Max 100ledger.events[].newPaymentOptionalNonnegative currency major units; smallest nonzero amount is 0.000001.
Min 0 · Max 1000000000000Example request body (JSON)
{
"asOfDate": "2026-03-01",
"currency": "USD",
"ledger": {
"account": {
"id": "loan",
"accountClass": "liability",
"accountType": "auto_loan",
"calculationModel": "fixed_amortizing",
"ownershipPercentage": 100
},
"observations": [
{
"id": "a",
"observedOn": "2026-01-01",
"value": 1000,
"valueKind": "verified"
}
],
"terms": [
{
"version": 1,
"effectiveFrom": "2026-01-01",
"rateType": "fixed",
"annualRate": 12,
"paymentFrequency": "monthly",
"scheduledPayment": 100,
"dueDay": 1
}
],
"events": [
{
"occurredOn": "2026-02-01",
"eventType": "missed_payment",
"idempotencyKey": "missed-Feb"
}
]
}
} Full JSON schema
{
"type": "object",
"properties": {
"asOfDate": {
"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."
},
"currency": {
"type": "string",
"enum": [
"USD",
"CAD",
"EUR",
"GBP",
"AUD",
"NZD",
"CHF",
"CNY",
"INR",
"BRL",
"MXN",
"JPY",
"BHD",
"JOD",
"KWD",
"OMR"
],
"description": "One supported currency per request. The app rounds JPY to 0 decimals, BHD/JOD/KWD/OMR to 3 and the remaining supported codes to 2. No FX conversion."
},
"ledger": {
"type": "object",
"properties": {
"account": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 48,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "Caller-defined, nonidentifying key within this request."
},
"accountType": {
"type": "string",
"enum": [
"credit_card",
"mortgage",
"auto_loan",
"student_loan",
"personal_loan",
"loan",
"heloc",
"home_equity_loan",
"checking",
"savings",
"cash",
"investment",
"retirement",
"money_market",
"cd",
"crypto",
"property",
"vehicle",
"collectible",
"business_interest",
"other"
]
},
"accountClass": {
"type": "string",
"enum": [
"asset",
"liability"
]
},
"calculationModel": {
"type": "string",
"enum": [
"fixed_amortizing",
"daily_interest",
"adjustable_rate",
"interest_only",
"balloon",
"revolving",
"deposit",
"investment",
"cash_flow",
"observed_value"
]
},
"ownershipPercentage": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Percentage points from 0 through 100."
}
},
"required": [
"id",
"accountType",
"accountClass",
"calculationModel"
],
"additionalProperties": false,
"description": "Caller supplies the model. Ownership defaults to 100%; used in the snapshot only."
},
"observations": {
"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."
},
"observedOn": {
"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."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"valueKind": {
"type": "string",
"enum": [
"verified",
"estimated"
]
},
"supersedesId": {
"type": "string",
"minLength": 1,
"maxLength": 48,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "Caller-defined, nonidentifying key within this request."
}
},
"required": [
"id",
"observedOn",
"value",
"valueKind"
],
"additionalProperties": false,
"description": "Manual balance point. Verified means the caller confirmed it."
},
"minItems": 1,
"maxItems": 48
},
"terms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"version": {
"type": "integer",
"minimum": 1,
"maximum": 100000,
"description": "Effective term revision number."
},
"effectiveFrom": {
"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."
},
"effectiveTo": {
"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."
},
"rateType": {
"type": "string",
"enum": [
"none",
"fixed",
"variable",
"adjustable",
"promotional"
]
},
"rateBasis": {
"type": "string",
"enum": [
"apr",
"apy",
"nominal"
]
},
"annualRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"interestConvention": {
"type": "string",
"enum": [
"none",
"daily_365",
"daily_360",
"monthly",
"statement_cycle"
]
},
"compoundingFrequency": {
"type": "string",
"enum": [
"none",
"daily",
"monthly",
"quarterly",
"semiannual",
"annual"
]
},
"paymentFrequency": {
"type": "string",
"enum": [
"weekly",
"biweekly",
"semimonthly",
"monthly",
"quarterly",
"annual"
]
},
"scheduledPayment": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"minimumPayment": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
},
"maturityDate": {
"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."
},
"dueDay": {
"type": "integer",
"minimum": 1,
"maximum": 31,
"description": "Day of month; clamped in short months."
},
"promotionalRateExpiresOn": {
"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."
},
"armNextResetOn": {
"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."
},
"interestOnlyUntil": {
"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."
}
},
"required": [
"version",
"effectiveFrom",
"rateType"
],
"additionalProperties": false,
"description": "Effective debt or deposit terms. Unknown assumed rate changes stop a projection. A missing rate/frequency yields engine warnings."
},
"minItems": 0,
"maxItems": 24
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"idempotencyKey": {
"type": "string",
"minLength": 1,
"maxLength": 48,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "Caller-defined, nonidentifying key within this request."
},
"occurredOn": {
"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."
},
"eventType": {
"type": "string",
"enum": [
"payment",
"extra_payment",
"missed_payment",
"contribution",
"withdrawal",
"purchase",
"fee",
"rate_change",
"payment_change",
"capitalization",
"correction"
]
},
"amount": {
"type": "number",
"minimum": -1000000000000,
"maximum": 1000000000000,
"description": "Signed amount in currency major units; a correction may decrease the balance."
},
"newRate": {
"type": "number",
"minimum": 0,
"maximum": 100,
"description": "Annual rate as percentage points (6.5 means 6.5%)."
},
"newPayment": {
"type": "number",
"minimum": 0,
"maximum": 1000000000000,
"description": "Nonnegative currency major units; smallest nonzero amount is 0.000001.",
"anyOf": [
{
"const": 0
},
{
"minimum": 0.000001
}
]
}
},
"required": [
"idempotencyKey",
"occurredOn",
"eventType"
],
"additionalProperties": false,
"description": "A recorded activity. Amount for monetary events, signed amount for correction, newRate for rate_change, newPayment for payment_change, no amount for missed_payment. Identical repeated keys count once."
},
"minItems": 0,
"maxItems": 128
}
},
"required": [
"account",
"observations"
],
"additionalProperties": false,
"description": "Single account history. Supply an observation on or before the snapshot date; raw account projection preserves the engine warning for earlier dates."
}
},
"required": [
"asOfDate",
"currency",
"ledger"
],
"additionalProperties": false
}Production endpoint: POST https://calc.hasstechapi.com/v2/calc/financial-hub-debt-schedule
Formula: financial-hub-debt-schedule-v1