APG PayAPG Paydocs

Loans

Create loan statements

POST/loan-statements

Cut a statement for a loan's current period, or recreate historic ones. Selected by the body's type.

2 actionsLstmtCmdCreateLstmtCmdCreateHistoric

Permissions

Required permission
loanStatements:create

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

Request body

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

Discriminated by type
type = "LstmtCmdCreate"
loanIdLoanIdrequired

Identifier of a loan.

Example loan_9f2Kd8QpLzXw

curl -X POST https://api.tst.au.apgpay.dev/loan-statements \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "LstmtCmdCreate",
  "loanId": "loan_9f2Kd8QpLzXw"
}'

Responses

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

Discriminated by type
type = "LstmtCreateRspAttributes"

The resource that was created.

Example
{
  "type": "LstmtCreateRspAttributes",
  "created": {
    "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