{
  "service": "Creditcrest LoanManager",
  "what": "A loan account replayed from its terms and what happened to it: every payment allocated, every day past due counted, and the Code’s limits on a small amount contract checked as it goes.",
  "version": "1.0.0",
  "engine": "1.0.0",
  "not_a_decision": "This is the arithmetic of an account from the terms and the events the lender supplied. It moves no money, grants and refuses nothing, and does not say whether any step against the borrower may be taken. Creditcrest Technologies is not a credit provider, is not a credit assistance provider, and does not hold an Australian credit licence. Its software produces evidence; the licensee makes the decision.",
  "stores": "nothing",
  "takes": {
    "query": [
      {
        "name": "ref",
        "kind": "text",
        "label": "Account reference",
        "hint": "Printed on the page and carried in the link, so a reference and not a person’s name."
      },
      {
        "name": "kind",
        "kind": "choice",
        "label": "The contract is",
        "hint": "What Creditcrest Small Amount classified it as. It decides which provisions of the Code the ledger checks, so it is asked rather than guessed from the amount.",
        "options": [
          "sacc",
          "macc",
          "other"
        ]
      },
      {
        "name": "amount",
        "kind": "number",
        "label": "Credit provided",
        "hint": "Dollars."
      },
      {
        "name": "entered",
        "kind": "day",
        "label": "Contract entered into, and credit advanced, on",
        "hint": null
      },
      {
        "name": "first",
        "kind": "day",
        "label": "First repayment due on",
        "hint": null
      },
      {
        "name": "repayments",
        "kind": "number",
        "label": "Number of repayments",
        "hint": null
      },
      {
        "name": "cadence",
        "kind": "choice",
        "label": "Repaid",
        "hint": null,
        "options": [
          "monthly",
          "fortnightly",
          "weekly"
        ]
      },
      {
        "name": "establishment",
        "kind": "number",
        "label": "Establishment fee",
        "hint": "Dollars, charged when the credit is advanced and owed across the repayments."
      },
      {
        "name": "monthly",
        "kind": "number",
        "label": "Monthly fee",
        "hint": "Dollars a month. The schedule carries one for each month commencing before the last repayment, counted from the day of entry, as s 31A(1)(b) runs them."
      },
      {
        "name": "rate",
        "kind": "number",
        "label": "Annual percentage rate",
        "hint": "Per cent a year; 30 means 30%. A medium amount contract only — interest accrues daily on the principal and is charged on each due date. On a small amount contract the Code forbids any, and none is charged."
      },
      {
        "name": "asat",
        "kind": "day",
        "label": "Show the account as at",
        "hint": "Left empty, the later of the last event and the last due date — not today, so that the same link shows the same account next month."
      }
    ],
    "events_line": "<id> <YYYY-MM-DD> <type> [amount] [part] [of <id>] [enforcement] [| reason]",
    "max_event_lines": 400
  },
  "origination": {
    "application": "POST /v1/loanmanager/application — {catalogue, product, onDay, request, form, answers, applicant}: the application against the product version and form the lender published on that day",
    "contract": "POST /v1/loanmanager/contract — {contract: {pricing}, events: [{on, to}], asAt}: where a contract stands, from prepared to funded",
    "assessment_copy": "GET /v1/loanmanager/assessment-copy?requested=YYYY-MM-DD&credit=YYYY-MM-DD — when the consumer’s copy is due under s 132"
  },
  "account_endpoint": {
    "method": "POST",
    "path": "/v1/loanmanager/account",
    "body": "{ \"terms\": { reference, kind, principal, enteredOn, disbursedOn, annualRate, establishmentFee, feesCapitalised, dayBasis, allocation, schedule: [{ due, principal, establishmentFee, monthlyFee, interest, otherFee }] }, \"events\": [{ id, type, on, amount, part, reverses, reason, by, method, reference, enforcementExpense }], \"asAt\": \"YYYY-MM-DD\" }",
    "max_events": 5000
  },
  "events": {
    "payment": "Money received from the borrower. Needs an amount.",
    "fee": "A default or other account-level fee charged. Needs an amount and a part: dishonourFee, collectionFee or otherFee.",
    "waiver": "Part of a balance given up by the lender. Needs an amount, a part and a reason.",
    "refund": "Credit on the account paid back to the borrower. Needs an amount and a reason.",
    "reversal": "An earlier event undone in full — a dishonoured payment, a fee charged in error. Needs `reverses`, the id of that event, and a reason.",
    "hardship-start": "A hardship arrangement the lender agreed and recorded, starting this day. Needs a reason, the day it ends (`until`) and a fixed payment plan (`plan`). Days past due are frozen at the figure they stood at the day before it began.",
    "hardship-end": "An arrangement ended before its end day — the plan broken, or the borrower back on their feet. Needs a reason. An arrangement that reaches its end day ends by itself, and days past due count on from the frozen figure the day after, if anything is still in arrears."
  },
  "parts": {
    "principal": "Principal",
    "establishmentFee": "Establishment fee",
    "monthlyFee": "Monthly fee",
    "interest": "Interest",
    "otherFee": "Other fee",
    "dishonourFee": "Dishonour fee",
    "collectionFee": "Collection fee"
  },
  "allocation": {
    "version": "oldest-due-fees-principal-v1",
    "order": [
      "dishonourFee",
      "collectionFee",
      "otherFee",
      "monthlyFee",
      "establishmentFee",
      "interest",
      "principal"
    ]
  },
  "accounts": {
    "loans": "Loans receivable — principal",
    "fees": "Fees receivable",
    "interest": "Interest receivable",
    "cash": "Cash at bank (clearing)",
    "feeIncome": "Fee income",
    "interestIncome": "Interest income",
    "customerCredit": "Customer credit balances",
    "waivers": "Fees and interest waived",
    "principalWaived": "Principal written off"
  },
  "examples": [
    {
      "title": "Paid on the day, every time",
      "query": "kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-04-15&events=p1%202026-11-01%20payment%20240.01%0Ap2%202026-12-01%20payment%20240.01%0Ap3%202027-01-01%20payment%20240.01%0Ap4%202027-02-01%20payment%20240.01%0Ap5%202027-03-01%20payment%20240.01%0Ap6%202027-04-01%20payment%20239.95",
      "url": "/loanmanager?kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-04-15&events=p1%202026-11-01%20payment%20240.01%0Ap2%202026-12-01%20payment%20240.01%0Ap3%202027-01-01%20payment%20240.01%0Ap4%202027-02-01%20payment%20240.01%0Ap5%202027-03-01%20payment%20240.01%0Ap6%202027-04-01%20payment%20239.95"
    },
    {
      "title": "A dishonour, then arrears",
      "query": "kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-01-10&events=p1%202026-11-01%20payment%20240.01%0Ap2%202026-12-01%20payment%20240.01%0Ar1%202026-12-03%20reversal%20of%20p2%20%7C%20Dishonoured%20by%20the%20paying%20bank%0Af1%202026-12-03%20fee%2015%20dishonourFee%20%7C%20Dishonour%20fee%20under%20the%20contract",
      "url": "/loanmanager?kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-01-10&events=p1%202026-11-01%20payment%20240.01%0Ap2%202026-12-01%20payment%20240.01%0Ar1%202026-12-03%20reversal%20of%20p2%20%7C%20Dishonoured%20by%20the%20paying%20bank%0Af1%202026-12-03%20fee%2015%20dishonourFee%20%7C%20Dishonour%20fee%20under%20the%20contract"
    },
    {
      "title": "An arrangement that pauses the count",
      "query": "kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-01-10&events=p1%202026-11-01%20payment%20240.01%0Ah1%202026-12-05%20hardship-start%20until%202027-03-05%20plan%20120%20monthly%20from%202026-12-20%20%7C%20Hardship%20notice%20given%20by%20phone%3B%20three%20months%20at%20half%20repayments%20agreed%0Aq1%202026-12-20%20payment%20120",
      "url": "/loanmanager?kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-01-10&events=p1%202026-11-01%20payment%20240.01%0Ah1%202026-12-05%20hardship-start%20until%202027-03-05%20plan%20120%20monthly%20from%202026-12-20%20%7C%20Hardship%20notice%20given%20by%20phone%3B%20three%20months%20at%20half%20repayments%20agreed%0Aq1%202026-12-20%20payment%20120"
    },
    {
      "title": "Paid out early — and s 31C",
      "query": "kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-05-01&events=p1%202026-11-01%20payment%20240.01%0Ap2%202026-12-01%20payment%20240.01%0Ap3%202026-12-10%20payment%20800",
      "url": "/loanmanager?kind=sacc&amount=1000&entered=2026-10-01&first=2026-11-01&repayments=6&cadence=monthly&establishment=200&monthly=40&asat=2027-05-01&events=p1%202026-11-01%20payment%20240.01%0Ap2%202026-12-01%20payment%20240.01%0Ap3%202026-12-10%20payment%20800"
    },
    {
      "title": "A medium amount contract, interest daily",
      "query": "kind=macc&amount=3000&entered=2026-10-01&first=2026-10-15&repayments=26&cadence=fortnightly&establishment=400&rate=30&asat=2026-11-05&events=m1%202026-10-15%20payment%20149.61%0Am2%202026-10-29%20payment%20149.61",
      "url": "/loanmanager?kind=macc&amount=3000&entered=2026-10-01&first=2026-10-15&repayments=26&cadence=fortnightly&establishment=400&rate=30&asat=2026-11-05&events=m1%202026-10-15%20payment%20149.61%0Am2%202026-10-29%20payment%20149.61"
    }
  ]
}