{
  "example": "buy-here-pay-here \u2014 retail installment contract",
  "source": "https://amortance.com/bhph",
  "note": "Synthetic data, real mechanics. Generated from the same engine the page runs, not read by it: this file fixes the inputs and the expected outputs so the numbers can be reproduced independently. verify.py does exactly that and is published beside it.",
  "deal": {
    "sold": "2026-01-16",
    "lines": [
      {
        "line": "Vehicle",
        "detail": "2018 Chevrolet Equinox LT, 96,412 mi",
        "amount": "13995"
      },
      {
        "line": "Service contract",
        "detail": "24 months / 24,000 miles",
        "amount": "1795"
      },
      {
        "line": "GAP waiver",
        "detail": "term of the contract",
        "amount": "495"
      },
      {
        "line": "Documentary fee",
        "detail": "",
        "amount": "199"
      },
      {
        "line": "Sales tax",
        "detail": "state and local",
        "amount": "874.69"
      },
      {
        "line": "Title and registration",
        "detail": "",
        "amount": "215"
      }
    ],
    "cash_down": "2175",
    "amount_financed": "15398.69"
  },
  "terms": {
    "apr": "0.1990",
    "accrual": "simple interest on outstanding principal, no compounding",
    "rounding": "half up to the cent, computed per interval, at posting",
    "allocation": "accrued interest first, then principal",
    "payment_pricing": "=PMT at the nominal periodic rate (APR x 14 / day-count basis)",
    "on_change": "payment holds, term moves",
    "payoff_search": "endNone/endCancel/endReceipt: the contract ends at the first scheduled date where the balance reaches zero. That last payment is the level payment less whatever it overpays, and if a residual survives the final scheduled date the schedule extends by one more period",
    "refund_pricing": "the gross refund is the premium times the unused fraction, rounded to the cent; the cancellation fee is subtracted from the rounded figure",
    "float": "float21 is the raw interest on the net refund over the days between cancellation and receipt, at the APR on the basis in force; floatLife is what the two credit dates do to the final payment; earlyBy is the difference in the number of payments",
    "daily": "daily: the principal outstanding at the loss times the APR over the day-count basis, rounded to the cent",
    "already_collected": "charged15/replayed15/diff15: payment 15, collected on 2026-08-14, split as it was split that day with the refund not yet credited, and split again once the refund is credited as of the cancellation date. The contract, the date and the amount are the same in both",
    "without_the_deferral": "p13Plain: what installment 13 would have put to principal had payment 12 been collected on time and no fee financed",
    "opening_schedule": "op1..op3 are the projection made at origination; op11 is the eleventh payment as it actually posted",
    "gap_waiver": "waives the unpaid balance as of the date of loss, less two exclusions it names: any amount added to the balance after origination (waiverExcludedFee, the deferral fee) and any installment that fell due and was not collected before the loss (waiverExcludedSkipped, the deferred payment 12, whose new date falls after the loss). waiverExcludes is their sum. A waiver forgives debt; it does not pay"
  },
  "states": [
    {
      "policy": {
        "day_count": "actual/365",
        "refund_pro_rated_on": "elapsed days",
        "refund_effective": "POLICY FORK \u2014 endNone/endCancel/endReceipt are the same contract with no refund, with it credited on the cancellation date, and with it credited when the money arrives. Every other figure here credits it on the cancellation date"
      },
      "payments": {
        "first": "2026-01-30",
        "every_days": 14,
        "count": 91,
        "amount": "235.35",
        "exceptions": [
          {
            "on": "2026-07-03",
            "not_collected": true,
            "moved_to": "2029-07-27",
            "reason": "skip clause"
          },
          {
            "after": "2026-10-02",
            "not_collected": true,
            "reason": "assumption of this example: nothing collected after the loss"
          }
        ]
      },
      "events": [
        {
          "on": "2026-07-03",
          "kind": "fee",
          "amount": "25.00",
          "note": "deferral fee, financed"
        },
        {
          "on": "2026-08-07",
          "kind": "service_contract_canceled",
          "premium": "1795.00",
          "term": {
            "days": 730,
            "months": 24
          },
          "cancellation_fee": "25",
          "received": "2026-08-28",
          "note": "service contract canceled, 203 of 730 days used, less the $25 cancellation fee; the refund is a principal reduction, credited on the date the policy fork names"
        },
        {
          "on": "2026-10-02",
          "kind": "total_loss",
          "acv": "9850.00",
          "insurer_paid": "2026-10-24"
        }
      ],
      "expected": {
        "financed": "15,398.69",
        "pay0": "235.35",
        "firstDay": "Friday",
        "refundGross": "1,295.84",
        "refund": "1,270.84",
        "refundUsed": "203",
        "refundOf": "730",
        "refundCalc": "$1,795.00 \u00d7 (1 \u2212 203 \u00f7 730) = $1,295.84; $1,295.84 \u2212 $25.00 = $1,270.84",
        "feeBalance": "14,077.15",
        "p11Balance": "14,052.15",
        "p11Interest": "108.23",
        "p11Principal": "127.12",
        "feeInterest": "107.26",
        "p13Interest": "214.71",
        "p13Principal": "20.64",
        "p13Balance": "14,056.51",
        "p13Accrued1": "107.26",
        "p13Accrued2": "107.45",
        "p13Plain": "129.07",
        "charged15Interest": "106.31",
        "charged15Principal": "129.04",
        "charged15Balance": "13,799.41",
        "replayed15Interest": "101.47",
        "replayed15Principal": "133.88",
        "replayed15Balance": "12,523.73",
        "diff15Interest": "\u22124.84",
        "diff15Principal": "4.84",
        "diff15Balance": "\u22121,275.68",
        "p14Interest": "107.29",
        "p14Principal": "128.06",
        "p14Balance": "13,928.45",
        "endNoneDate": "2029-08-24",
        "endNoneNo": "93",
        "endNoneFinal": "8.59",
        "endNoneInterest": "6,237.10",
        "endCancelDate": "2029-04-06",
        "endCancelNo": "83",
        "endCancelFinal": "127.02",
        "endCancelInterest": "5,272.87",
        "endReceiptDate": "2029-04-06",
        "endReceiptNo": "83",
        "endReceiptFinal": "151.46",
        "endReceiptInterest": "5,297.31",
        "float21": "14.55",
        "floatLife": "24.44",
        "earlyBy": "10",
        "principalLoss": "12,101.25",
        "accruedLoss": "46.18",
        "payoffLoss": "12,147.43",
        "deficiencyLoss": "2,297.43",
        "principalSettle": "12,101.25",
        "accruedSettle": "191.33",
        "payoffSettle": "12,292.58",
        "deficiencySettle": "2,442.58",
        "lossGap": "145.15",
        "waiverExcludedFee": "25.00",
        "waiverExcludedSkipped": "235.35",
        "waiverExcludes": "260.35",
        "waiverWaives": "2,037.08",
        "remainder": "405.50",
        "acv": "9,850.00",
        "daily": "6.60",
        "op1Interest": "117.54",
        "op1Principal": "117.81",
        "op1Balance": "15,280.88",
        "op1Days": "14",
        "op2Interest": "116.64",
        "op2Principal": "118.71",
        "op2Balance": "15,162.17",
        "op2Days": "14",
        "op3Interest": "115.73",
        "op3Principal": "119.62",
        "op3Balance": "15,042.55",
        "op3Days": "14",
        "op11Interest": "108.23",
        "op11Principal": "127.12",
        "op11Balance": "14,052.15",
        "op11Days": "14"
      }
    },
    {
      "policy": {
        "day_count": "actual/365",
        "refund_pro_rated_on": "started months",
        "refund_effective": "POLICY FORK \u2014 endNone/endCancel/endReceipt are the same contract with no refund, with it credited on the cancellation date, and with it credited when the money arrives. Every other figure here credits it on the cancellation date"
      },
      "payments": {
        "first": "2026-01-30",
        "every_days": 14,
        "count": 91,
        "amount": "235.35",
        "exceptions": [
          {
            "on": "2026-07-03",
            "not_collected": true,
            "moved_to": "2029-07-27",
            "reason": "skip clause"
          },
          {
            "after": "2026-10-02",
            "not_collected": true,
            "reason": "assumption of this example: nothing collected after the loss"
          }
        ]
      },
      "events": [
        {
          "on": "2026-07-03",
          "kind": "fee",
          "amount": "25.00",
          "note": "deferral fee, financed"
        },
        {
          "on": "2026-08-07",
          "kind": "service_contract_canceled",
          "premium": "1795.00",
          "term": {
            "days": 730,
            "months": 24
          },
          "cancellation_fee": "25",
          "received": "2026-08-28",
          "note": "service contract canceled, 7 of 24 months used, less the $25 cancellation fee; the refund is a principal reduction, credited on the date the policy fork names"
        },
        {
          "on": "2026-10-02",
          "kind": "total_loss",
          "acv": "9850.00",
          "insurer_paid": "2026-10-24"
        }
      ],
      "expected": {
        "financed": "15,398.69",
        "pay0": "235.35",
        "firstDay": "Friday",
        "refundGross": "1,271.46",
        "refund": "1,246.46",
        "refundUsed": "7",
        "refundOf": "24",
        "refundCalc": "$1,795.00 \u00d7 (1 \u2212 7 \u00f7 24) = $1,271.46; $1,271.46 \u2212 $25.00 = $1,246.46",
        "feeBalance": "14,077.15",
        "p11Balance": "14,052.15",
        "p11Interest": "108.23",
        "p11Principal": "127.12",
        "feeInterest": "107.26",
        "p13Interest": "214.71",
        "p13Principal": "20.64",
        "p13Balance": "14,056.51",
        "p13Accrued1": "107.26",
        "p13Accrued2": "107.45",
        "p13Plain": "129.07",
        "charged15Interest": "106.31",
        "charged15Principal": "129.04",
        "charged15Balance": "13,799.41",
        "replayed15Interest": "101.56",
        "replayed15Principal": "133.79",
        "replayed15Balance": "12,548.20",
        "diff15Interest": "\u22124.75",
        "diff15Principal": "4.75",
        "diff15Balance": "\u22121,251.21",
        "p14Interest": "107.29",
        "p14Principal": "128.06",
        "p14Balance": "13,928.45",
        "endNoneDate": "2029-08-24",
        "endNoneNo": "93",
        "endNoneFinal": "8.59",
        "endNoneInterest": "6,237.10",
        "endCancelDate": "2029-04-06",
        "endCancelNo": "83",
        "endCancelFinal": "168.37",
        "endCancelInterest": "5,289.84",
        "endReceiptDate": "2029-04-06",
        "endReceiptNo": "83",
        "endReceiptFinal": "192.33",
        "endReceiptInterest": "5,313.80",
        "float21": "14.27",
        "floatLife": "23.96",
        "earlyBy": "10",
        "principalLoss": "12,126.28",
        "accruedLoss": "46.28",
        "payoffLoss": "12,172.56",
        "deficiencyLoss": "2,322.56",
        "principalSettle": "12,126.28",
        "accruedSettle": "191.73",
        "payoffSettle": "12,318.01",
        "deficiencySettle": "2,468.01",
        "lossGap": "145.45",
        "waiverExcludedFee": "25.00",
        "waiverExcludedSkipped": "235.35",
        "waiverExcludes": "260.35",
        "waiverWaives": "2,062.21",
        "remainder": "405.80",
        "acv": "9,850.00",
        "daily": "6.61",
        "op1Interest": "117.54",
        "op1Principal": "117.81",
        "op1Balance": "15,280.88",
        "op1Days": "14",
        "op2Interest": "116.64",
        "op2Principal": "118.71",
        "op2Balance": "15,162.17",
        "op2Days": "14",
        "op3Interest": "115.73",
        "op3Principal": "119.62",
        "op3Balance": "15,042.55",
        "op3Days": "14",
        "op11Interest": "108.23",
        "op11Principal": "127.12",
        "op11Balance": "14,052.15",
        "op11Days": "14"
      }
    },
    {
      "policy": {
        "day_count": "actual/360",
        "refund_pro_rated_on": "elapsed days",
        "refund_effective": "POLICY FORK \u2014 endNone/endCancel/endReceipt are the same contract with no refund, with it credited on the cancellation date, and with it credited when the money arrives. Every other figure here credits it on the cancellation date"
      },
      "payments": {
        "first": "2026-01-30",
        "every_days": 14,
        "count": 91,
        "amount": "236.36",
        "exceptions": [
          {
            "on": "2026-07-03",
            "not_collected": true,
            "moved_to": "2029-07-27",
            "reason": "skip clause"
          },
          {
            "after": "2026-10-02",
            "not_collected": true,
            "reason": "assumption of this example: nothing collected after the loss"
          }
        ]
      },
      "events": [
        {
          "on": "2026-07-03",
          "kind": "fee",
          "amount": "25.00",
          "note": "deferral fee, financed"
        },
        {
          "on": "2026-08-07",
          "kind": "service_contract_canceled",
          "premium": "1795.00",
          "term": {
            "days": 730,
            "months": 24
          },
          "cancellation_fee": "25",
          "received": "2026-08-28",
          "note": "service contract canceled, 203 of 730 days used, less the $25 cancellation fee; the refund is a principal reduction, credited on the date the policy fork names"
        },
        {
          "on": "2026-10-02",
          "kind": "total_loss",
          "acv": "9850.00",
          "insurer_paid": "2026-10-24"
        }
      ],
      "expected": {
        "financed": "15,398.69",
        "pay0": "236.36",
        "firstDay": "Friday",
        "refundGross": "1,295.84",
        "refund": "1,270.84",
        "refundUsed": "203",
        "refundOf": "730",
        "refundCalc": "$1,795.00 \u00d7 (1 \u2212 203 \u00f7 730) = $1,295.84; $1,295.84 \u2212 $25.00 = $1,270.84",
        "feeBalance": "14,083.53",
        "p11Balance": "14,058.53",
        "p11Interest": "109.78",
        "p11Principal": "126.58",
        "feeInterest": "108.80",
        "p13Interest": "217.79",
        "p13Principal": "18.57",
        "p13Balance": "14,064.96",
        "p13Accrued1": "108.80",
        "p13Accrued2": "108.99",
        "p13Plain": "128.55",
        "charged15Interest": "107.86",
        "charged15Principal": "128.50",
        "charged15Balance": "13,808.95",
        "replayed15Interest": "102.94",
        "replayed15Principal": "133.42",
        "replayed15Balance": "12,533.19",
        "diff15Interest": "\u22124.92",
        "diff15Principal": "4.92",
        "diff15Balance": "\u22121,275.76",
        "p14Interest": "108.85",
        "p14Principal": "127.51",
        "p14Balance": "13,937.45",
        "endNoneDate": "2029-08-24",
        "endNoneNo": "93",
        "endNoneFinal": "12.70",
        "endNoneInterest": "6,334.13",
        "endCancelDate": "2029-04-06",
        "endCancelNo": "83",
        "endCancelFinal": "123.72",
        "endCancelInterest": "5,352.39",
        "endReceiptDate": "2029-04-06",
        "endReceiptNo": "83",
        "endReceiptFinal": "148.69",
        "endReceiptInterest": "5,377.36",
        "float21": "14.75",
        "floatLife": "24.97",
        "earlyBy": "10",
        "principalLoss": "12,111.84",
        "accruedLoss": "46.87",
        "payoffLoss": "12,158.71",
        "deficiencyLoss": "2,308.71",
        "principalSettle": "12,111.84",
        "accruedSettle": "194.16",
        "payoffSettle": "12,306.00",
        "deficiencySettle": "2,456.00",
        "lossGap": "147.29",
        "waiverExcludedFee": "25.00",
        "waiverExcludedSkipped": "236.36",
        "waiverExcludes": "261.36",
        "waiverWaives": "2,047.35",
        "remainder": "408.65",
        "acv": "9,850.00",
        "daily": "6.70",
        "op1Interest": "119.17",
        "op1Principal": "117.19",
        "op1Balance": "15,281.50",
        "op1Days": "14",
        "op2Interest": "118.26",
        "op2Principal": "118.10",
        "op2Balance": "15,163.40",
        "op2Days": "14",
        "op3Interest": "117.35",
        "op3Principal": "119.01",
        "op3Balance": "15,044.39",
        "op3Days": "14",
        "op11Interest": "109.78",
        "op11Principal": "126.58",
        "op11Balance": "14,058.53",
        "op11Days": "14"
      }
    },
    {
      "policy": {
        "day_count": "actual/360",
        "refund_pro_rated_on": "started months",
        "refund_effective": "POLICY FORK \u2014 endNone/endCancel/endReceipt are the same contract with no refund, with it credited on the cancellation date, and with it credited when the money arrives. Every other figure here credits it on the cancellation date"
      },
      "payments": {
        "first": "2026-01-30",
        "every_days": 14,
        "count": 91,
        "amount": "236.36",
        "exceptions": [
          {
            "on": "2026-07-03",
            "not_collected": true,
            "moved_to": "2029-07-27",
            "reason": "skip clause"
          },
          {
            "after": "2026-10-02",
            "not_collected": true,
            "reason": "assumption of this example: nothing collected after the loss"
          }
        ]
      },
      "events": [
        {
          "on": "2026-07-03",
          "kind": "fee",
          "amount": "25.00",
          "note": "deferral fee, financed"
        },
        {
          "on": "2026-08-07",
          "kind": "service_contract_canceled",
          "premium": "1795.00",
          "term": {
            "days": 730,
            "months": 24
          },
          "cancellation_fee": "25",
          "received": "2026-08-28",
          "note": "service contract canceled, 7 of 24 months used, less the $25 cancellation fee; the refund is a principal reduction, credited on the date the policy fork names"
        },
        {
          "on": "2026-10-02",
          "kind": "total_loss",
          "acv": "9850.00",
          "insurer_paid": "2026-10-24"
        }
      ],
      "expected": {
        "financed": "15,398.69",
        "pay0": "236.36",
        "firstDay": "Friday",
        "refundGross": "1,271.46",
        "refund": "1,246.46",
        "refundUsed": "7",
        "refundOf": "24",
        "refundCalc": "$1,795.00 \u00d7 (1 \u2212 7 \u00f7 24) = $1,271.46; $1,271.46 \u2212 $25.00 = $1,246.46",
        "feeBalance": "14,083.53",
        "p11Balance": "14,058.53",
        "p11Interest": "109.78",
        "p11Principal": "126.58",
        "feeInterest": "108.80",
        "p13Interest": "217.79",
        "p13Principal": "18.57",
        "p13Balance": "14,064.96",
        "p13Accrued1": "108.80",
        "p13Accrued2": "108.99",
        "p13Plain": "128.55",
        "charged15Interest": "107.86",
        "charged15Principal": "128.50",
        "charged15Balance": "13,808.95",
        "replayed15Interest": "103.04",
        "replayed15Principal": "133.32",
        "replayed15Balance": "12,557.67",
        "diff15Interest": "\u22124.82",
        "diff15Principal": "4.82",
        "diff15Balance": "\u22121,251.28",
        "p14Interest": "108.85",
        "p14Principal": "127.51",
        "p14Balance": "13,937.45",
        "endNoneDate": "2029-08-24",
        "endNoneNo": "93",
        "endNoneFinal": "12.70",
        "endNoneInterest": "6,334.13",
        "endCancelDate": "2029-04-06",
        "endCancelNo": "83",
        "endCancelFinal": "165.35",
        "endCancelInterest": "5,369.64",
        "endReceiptDate": "2029-04-06",
        "endReceiptNo": "83",
        "endReceiptFinal": "189.87",
        "endReceiptInterest": "5,394.16",
        "float21": "14.47",
        "floatLife": "24.52",
        "earlyBy": "10",
        "principalLoss": "12,136.90",
        "accruedLoss": "46.96",
        "payoffLoss": "12,183.86",
        "deficiencyLoss": "2,333.86",
        "principalSettle": "12,136.90",
        "accruedSettle": "194.56",
        "payoffSettle": "12,331.46",
        "deficiencySettle": "2,481.46",
        "lossGap": "147.60",
        "waiverExcludedFee": "25.00",
        "waiverExcludedSkipped": "236.36",
        "waiverExcludes": "261.36",
        "waiverWaives": "2,072.50",
        "remainder": "408.96",
        "acv": "9,850.00",
        "daily": "6.71",
        "op1Interest": "119.17",
        "op1Principal": "117.19",
        "op1Balance": "15,281.50",
        "op1Days": "14",
        "op2Interest": "118.26",
        "op2Principal": "118.10",
        "op2Balance": "15,163.40",
        "op2Days": "14",
        "op3Interest": "117.35",
        "op3Principal": "119.01",
        "op3Balance": "15,044.39",
        "op3Days": "14",
        "op11Interest": "109.78",
        "op11Principal": "126.58",
        "op11Balance": "14,058.53",
        "op11Days": "14"
      }
    }
  ]
}
