APG PayAPG Paydocs

Loans

Update loan statement

PATCH/loan-statements/{loanStatementId}

Issue a statement, move its billing date, credit a payment, recompute its totals, cancel a late fee, cancel the loan's latest statement, or generate, regenerate and e-mail its documents.

11 actionsLstmtUpdateCancelLateFeeLstmtUpdateCancelLatestLstmtUpdateCreditPaymentLstmtUpdateGenerateDocumentsLstmtUpdateIssueLstmtUpdateRecalculateLstmtUpdateRegenerateDocumentsLstmtUpdateRegenerateReferenceLstmtUpdateResendEmailsLstmtUpdateSendEmailsLstmtUpdateSetBillingDate

Permissions

Required permission
loanStatements:update

Requires the `update` action on `loanStatements` for the supplied runtime context

Path parameters

loanStatementIdstring
required

Request body

This body is a typed union. Pick a variant to see its fields and a matching example.

Discriminated by type
type = "LstmtUpdateCancelLateFee"

This variant has no additional fields.

curl -X PATCH https://api.tst.au.apgpay.dev/loan-statements/{loanStatementId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "LstmtUpdateCancelLateFee"
}'

Responses

The response is a tagged shape: type is always "LstmtUpdateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "LstmtUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "LstmtUpdateRspAttributes",
  "updated": {
    "type": "LstmtViewAttributes",
    "loanStatementId": "lstmt_9f2Kd8QpLzXw",
    "loanId": "loan_9f2Kd8QpLzXw",
    "referenceStatementId": "your-own-reference",
    "merchantId": "mcht_9f2Kd8QpLzXw",
    "customerId": "cust_9f2Kd8QpLzXw",
    "status": "Draft",
    "periodStart": "2026-08-19",
    "periodEnd": "2026-08-19",
    "billingDate": "2026-08-19",
    "dueDate": "2026-08-19",
    "statementFrequency": {
      "type": "LprodFrequencyDaily"
    },
    "amounts": {
      "type": "LstmtAmountsAttributes",
      "currency": "AUD",
      "net": 1250,
      "insurance": 1250,
      "tax": 1250,
      "billed": 1250,
      "fees": 1250,
      "paid": 1250,
      "outstanding": 1250,
      "credited": 1250
    },
    "entries": [
      {
        "type": "LstmtEntryAttributes",
        "entryType": "Charge",
        "description": "string",
        "amounts": {
          "type": "LstmtEntryAmountsAttributes",
          "currency": "AUD",
          "total": 1250,
          "tax": 1250,
          "net": 1250
        },
        "taxRate": 0.9412,
        "taxType": "string",
        "originalAmount": {
          "type": "IsoCurrencyAmount",
          "minorCurrencyUnits": 1250,
          "currency": "AUD"
        },
        "loanTransactionId": "ltxn_9f2Kd8QpLzXw",
        "entryAt": "2026-08-19T04:21:07Z"
      }
    ],
    "lateFee": {
      "type": "LstmtLateFeeAttributes",
      "amounts": {
        "type": "LstmtEntryAmountsAttributes",
        "currency": "AUD",
        "total": 1250,
        "tax": 1250,
        "net": 1250
      },
      "calculatedTo": "2026-08-19",
      "narrative": "string"
    },
    "linkedStatementId": "lstmt_9f2Kd8QpLzXw",
    "narrative": "string",
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses