Skip to content

Investment · Calculation

Dated partner distribution waterfall

Allocates dated contributions and payouts in integer cents across investor and sponsor, with preferred return, capital priority, catch-up, fees, tier hurdles and final clawback. IRR hurdle values are fractional rates. Array positions generate anonymous ledger IDs.

Example result · state: available See output

Cost per success
20 calculation credits
Production plans
Standard, Business, Scale, Enterprise
Plan allowances
Free sandbox
Not available

Integration example

Make a request

Use a production key scoped to investor-partner-waterfall.

Keep the key on your server. A successful call uses 20 calculation credits.

Production request

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/investor-partner-waterfall";
const input = {
  "contributions": [
    {
      "date": "2025-01-01",
      "investorCents": 8000000,
      "sponsorCents": 2000000,
      "kind": "initial"
    }
  ],
  "distributions": [
    {
      "date": "2026-01-01",
      "amountCents": 15000000,
      "final": true
    }
  ],
  "annualPreferredReturnPct": 8,
  "preferredReturnCompounds": false,
  "returnCapitalBeforePreferredReturn": true,
  "sponsorCatchUpPct": 0,
  "tiers": [
    {
      "investorSharePct": 70
    }
  ],
  "enableClawback": false
};
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 HT_PRODUCTION_KEY on your server. Run in a POSIX shell with cURL 7.76+ and Python 3.7+ to create a request ID.

(
  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/investor-partner-waterfall' \
    --header "Authorization: Bearer $HT_PRODUCTION_KEY" \
    --header 'Content-Type: application/json' \
    --header "Idempotency-Key: $request_id" \
    --data-binary @- <<'HT_INPUT'
{
  "contributions": [
    {
      "date": "2025-01-01",
      "investorCents": 8000000,
      "sponsorCents": 2000000,
      "kind": "initial"
    }
  ],
  "distributions": [
    {
      "date": "2026-01-01",
      "amountCents": 15000000,
      "final": true
    }
  ],
  "annualPreferredReturnPct": 8,
  "preferredReturnCompounds": false,
  "returnCapitalBeforePreferredReturn": true,
  "sponsorCatchUpPct": 0,
  "tiers": [
    {
      "investorSharePct": 70
    }
  ],
  "enableClawback": false
}
HT_INPUT
)
If your request fails
400 INVALID_INPUT

Read error.details when present. Node prints each issue. cURL returns the JSON body. Each path points 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.

401 or 403
Check that the server has the bearer key for the endpoint’s environment and that the key includes investor-partner-waterfall.
429
Read the service error code, check your allowance, and wait for the Retry-After interval when supplied before trying again.
Lost response, 409 or 503
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_ID to 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.

state
available
formulaVersion
rules-workflows-1.1.0
value.formulaVersion
rules-workflows-1.1.0

Result warnings

  • This model is not the partnership agreement. Counsel and tax professionals must confirm contribution, fee, hurdle, clawback, and allocation language.
How to interpret this result
  • Allocates dated contributions and payouts in integer cents across investor and sponsor, with preferred return, capital priority, catch-up, fees, tier hurdles and final clawback. IRR hurdle values are fractional rates. Array positions generate anonymous ledger IDs.
Full example response (JSON)
{
  "status": "available",
  "result": {
    "state": "available",
    "fieldErrors": {},
    "warnings": [
      {
        "code": "agreement-review-required",
        "severity": "critical",
        "message": "This model is not the partnership agreement. Counsel and tax professionals must confirm contribution, fee, hurdle, clawback, and allocation language."
      }
    ],
    "assumptions": [
      {
        "key": "preferredReturnCompounds",
        "value": "false",
        "source": "user"
      },
      {
        "key": "returnCapitalBeforePreferredReturn",
        "value": "true",
        "source": "user"
      },
      {
        "key": "sponsorCatchUpPct",
        "value": "0",
        "unit": "%",
        "source": "user"
      },
      {
        "key": "enableClawback",
        "value": "false",
        "source": "user"
      }
    ],
    "provenance": [
      {
        "source": "User-declared dated contribution, distribution, and waterfall terms",
        "asOf": "2025-01-01"
      }
    ],
    "formulaVersion": "rules-workflows-1.1.0",
    "ruleVersions": [
      "rules-workflows-1.1.0:dated-waterfall:act-365"
    ],
    "auditTrail": [
      "Converted currency to exact integer cents and validated unique event IDs/dates.",
      "Accrued preferred return by actual elapsed days between dated events.",
      "Allocated capital, preference, catch-up, and tier profit in declared order.",
      "Reconciled investor, sponsor, retained, and available cents exactly.",
      "Solved investor XIRR only when a unique dated-cash-flow root existed."
    ],
    "value": {
      "formulaVersion": "rules-workflows-1.1.0",
      "status": "requires-professional-review",
      "ledger": [
        {
          "eventId": "capital-1",
          "date": "2025-01-01",
          "eventType": "contribution",
          "availableCents": 0,
          "investorCapitalCents": 0,
          "sponsorCapitalCents": 0,
          "investorPreferredCents": 0,
          "sponsorFeeCents": 0,
          "investorProfitCents": 0,
          "sponsorProfitCents": 0,
          "clawbackToInvestorCents": 0,
          "retainedCents": 0,
          "investorTotalCents": 0,
          "sponsorTotalCents": 0
        },
        {
          "eventId": "payout-01",
          "date": "2026-01-01",
          "eventType": "distribution",
          "availableCents": 15000000,
          "investorCapitalCents": 8000000,
          "sponsorCapitalCents": 2000000,
          "investorPreferredCents": 640000,
          "sponsorFeeCents": 0,
          "investorProfitCents": 3052000,
          "sponsorProfitCents": 1308000,
          "clawbackToInvestorCents": 0,
          "retainedCents": 0,
          "investorTotalCents": 11692000,
          "sponsorTotalCents": 3308000
        }
      ],
      "investorTotalCents": 11692000,
      "sponsorTotalCents": 3308000,
      "distributableTotalCents": 15000000,
      "retainedTotalCents": 0,
      "investorUnreturnedCapitalCents": 0,
      "sponsorUnreturnedCapitalCents": 0,
      "unpaidPreferredReturnCents": 0,
      "investorEquityMultiple": 1.4615,
      "investorXirr": 0.4615000007529854,
      "investorXirrState": "available",
      "conservationDifferenceCents": 0,
      "professionalReviewRequired": true,
      "issues": []
    }
  },
  "formulaVersion": "rules-workflows-1.1.0",
  "units": {
    "money": "integer USD cents for every amount ending in Cents",
    "annualPreferredReturnPct": "annual percent",
    "sponsorCatchUpPct": "percent",
    "investorSharePct": "percent",
    "clawbackSponsorProfitSharePct": "percent",
    "equityMultipleHurdle": "times contributed capital",
    "irrHurdle": "fractional annual rate",
    "investorXirr": "fractional annual rate"
  },
  "assumptions": [
    "Allocates dated contributions and payouts in integer cents across investor and sponsor, with preferred return, capital priority, catch-up, fees, tier hurdles and final clawback. IRR hurdle values are fractional rates. Array positions generate anonymous ledger IDs."
  ],
  "warnings": [
    "This model is not the partnership agreement. Counsel and tax professionals must confirm contribution, fee, hurdle, clawback, and allocation language."
  ],
  "creditCost": 20
}

Request contract

Accepted inputs

Fields for this example. Expand the schema for all supported combinations and limits.

FieldType, units and limits

contributionsRequired
arrayMin items 1 · Max items 48
contributions[].dateRequired
string

Gregorian calendar date, YYYY-MM-DD.

Format: date · Min length 10 · Max length 10
contributions[].investorCentsRequired
integer

Cash contributed by the investor on this date, in whole USD cents.

Min 0 · Max 100000000000
contributions[].sponsorCentsRequired
integer

Cash contributed by the sponsor on this date, in whole USD cents.

Min 0 · Max 100000000000
contributions[].kindRequired
stringAllowed: "initial", "capital-call"
distributionsRequired
arrayMin items 1 · Max items 64
distributions[].dateRequired
string

Gregorian calendar date, YYYY-MM-DD.

Format: date · Min length 10 · Max length 10
distributions[].amountCentsRequired
integer

Total available for this distribution before its sponsor fee, in whole USD cents.

Min 0 · Max 100000000000
distributions[].sponsorFeeCentsOptional
integer

Fee allocated to the sponsor from this distribution, in whole USD cents.

Min 0 · Max 100000000000
distributions[].finalOptional
boolean
annualPreferredReturnPctRequired
number

Annual preferred return on unreturned investor capital, in percent.

Min 0 · Max 100
preferredReturnCompoundsRequired
boolean
returnCapitalBeforePreferredReturnRequired
boolean
sponsorCatchUpPctRequired
number

Sponsor share targeted in the preference catch-up, in percent.

Min 0 · Max 100
tiersRequired
arrayMin items 1 · Max items 8
tiers[].investorSharePctRequired
number

Investor share of cash allocated to this residual tier, in percent.

Min 0 · Max 100
tiers[].hurdleOptional
object
tiers[].hurdle.kindRequired
stringAllowed: "equity-multiple", "irr"
tiers[].hurdle.valueRequired
number

For equity-multiple, a multiple of cumulative invested capital (1.5 means 1.5×). For irr, a fractional annual return (0.15 means 15%).

Min 0.000001 · Max 100
enableClawbackRequired
boolean
clawbackSponsorProfitSharePctOptional
number

Final target sponsor share of paid profit when clawback is enabled, in percent.

Min 0 · Max 100
Example request body (JSON)
{
  "contributions": [
    {
      "date": "2025-01-01",
      "investorCents": 8000000,
      "sponsorCents": 2000000,
      "kind": "initial"
    }
  ],
  "distributions": [
    {
      "date": "2026-01-01",
      "amountCents": 15000000,
      "final": true
    }
  ],
  "annualPreferredReturnPct": 8,
  "preferredReturnCompounds": false,
  "returnCapitalBeforePreferredReturn": true,
  "sponsorCatchUpPct": 0,
  "tiers": [
    {
      "investorSharePct": 70
    }
  ],
  "enableClawback": false
}
Full JSON schema
{
  "type": "object",
  "properties": {
    "contributions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "minLength": 10,
            "maxLength": 10,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Gregorian calendar date, YYYY-MM-DD."
          },
          "investorCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000000000,
            "description": "Cash contributed by the investor on this date, in whole USD cents."
          },
          "sponsorCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000000000,
            "description": "Cash contributed by the sponsor on this date, in whole USD cents."
          },
          "kind": {
            "enum": [
              "initial",
              "capital-call"
            ]
          }
        },
        "required": [
          "date",
          "investorCents",
          "sponsorCents",
          "kind"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 48
    },
    "distributions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "minLength": 10,
            "maxLength": 10,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Gregorian calendar date, YYYY-MM-DD."
          },
          "amountCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000000000,
            "description": "Total available for this distribution before its sponsor fee, in whole USD cents."
          },
          "sponsorFeeCents": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100000000000,
            "description": "Fee allocated to the sponsor from this distribution, in whole USD cents."
          },
          "final": {
            "type": "boolean"
          }
        },
        "required": [
          "date",
          "amountCents"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 64
    },
    "annualPreferredReturnPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Annual preferred return on unreturned investor capital, in percent."
    },
    "preferredReturnCompounds": {
      "type": "boolean"
    },
    "returnCapitalBeforePreferredReturn": {
      "type": "boolean"
    },
    "sponsorCatchUpPct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Sponsor share targeted in the preference catch-up, in percent."
    },
    "tiers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "investorSharePct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Investor share of cash allocated to this residual tier, in percent."
          },
          "hurdle": {
            "type": "object",
            "properties": {
              "kind": {
                "enum": [
                  "equity-multiple",
                  "irr"
                ]
              },
              "value": {
                "type": "number",
                "minimum": 0.000001,
                "maximum": 100,
                "description": "For equity-multiple, a multiple of cumulative invested capital (1.5 means 1.5×). For irr, a fractional annual return (0.15 means 15%)."
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "investorSharePct"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 8
    },
    "enableClawback": {
      "type": "boolean"
    },
    "clawbackSponsorProfitSharePct": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Final target sponsor share of paid profit when clawback is enabled, in percent."
    }
  },
  "required": [
    "contributions",
    "distributions",
    "annualPreferredReturnPct",
    "preferredReturnCompounds",
    "returnCapitalBeforePreferredReturn",
    "sponsorCatchUpPct",
    "tiers",
    "enableClawback"
  ],
  "additionalProperties": false,
  "description": "Allocates dated contributions and payouts in integer cents across investor and sponsor, with preferred return, capital priority, catch-up, fees, tier hurdles and final clawback. IRR hurdle values are fractional rates. Array positions generate anonymous ledger IDs."
}

Production endpoint: POST https://calc.hasstechapi.com/v2/calc/investor-partner-waterfall
Formula: rules-workflows-1.1.0

Related PDF reports