{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canopyservicing-com/json-schema/canopyservicing-com-get-account-payoff-amounts-response-schema.json",
  "title": "GetAccountPayoffAmountsResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/canopyservicing-com-accounts-api-openapi.yml#/components/schemas/GetAccountPayoffAmountsResponse",
  "properties": {
    "account_id": {
      "type": "string",
      "title": "Account Id",
      "description": "\n        The account id associated with the imputed interest calculation.\n        "
    },
    "effective_at": {
      "type": "string",
      "title": "Effective At",
      "description": "\n        The effective timing of the payoff response.\n        "
    },
    "account_aggregate": {
      "$ref": "#/$defs/PayoffAmounts",
      "description": "\n        Account-level aggregations of payoff amounts.\n        "
    },
    "payoff_amounts_by_loan": {
      "additionalProperties": {
        "$ref": "#/$defs/PayoffAmounts"
      },
      "type": "object",
      "title": "Payoff Amounts By Loan",
      "description": "\n        Payoff amounts for each loan.\n        "
    }
  },
  "type": "object",
  "required": [
    "account_id",
    "effective_at",
    "account_aggregate",
    "payoff_amounts_by_loan"
  ],
  "$defs": {
    "BalanceBreakdownCentsOutput": {
      "properties": {
        "principal_amount_cents": {
          "type": "integer",
          "title": "Principal Amount Cents"
        },
        "interest_amount_cents": {
          "type": "integer",
          "title": "Interest Amount Cents"
        },
        "fee_amount_cents": {
          "type": "integer",
          "title": "Fee Amount Cents"
        },
        "total_cents": {
          "type": "integer",
          "title": "Total Cents",
          "readOnly": true
        }
      },
      "type": "object",
      "required": [
        "principal_amount_cents",
        "interest_amount_cents",
        "fee_amount_cents",
        "total_cents"
      ],
      "title": "BalanceBreakdownCentsOutput",
      "description": "Balance Breakdown exposed to customers in API responses"
    },
    "PayoffAmounts": {
      "properties": {
        "payoff_amount_cents": {
          "type": "integer",
          "title": "Payoff Amount Cents",
          "description": "The total payoff amount in cents."
        },
        "unpaid_amounts_breakdown": {
          "$ref": "#/$defs/BalanceBreakdownCentsOutput",
          "description": "The unpaid balances."
        },
        "unposted_interest_cents": {
          "type": "integer",
          "title": "Unposted Interest Cents",
          "description": "The accrued interest for the current period in cents that has not yet been posted."
        }
      },
      "type": "object",
      "required": [
        "payoff_amount_cents",
        "unpaid_amounts_breakdown",
        "unposted_interest_cents"
      ],
      "title": "PayoffAmounts"
    }
  }
}