APG PayAPG Paydocs

Loans

Update statement receipt batch

PATCH/statement-receipt-batches/{statementReceiptBatchId}

Settle a batch the bank has accepted: its receipts are marked received and each is applied to its statement.

Permissions

Required permission
loanStatements:update

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

Path parameters

statementReceiptBatchIdstring
required

Request body

This body is a tagged shape: type is always "SrbatUpdateSettle". Send it; more variants can be added, and a caller that switches on it keeps working when they are.

Discriminated by type
type = "SrbatUpdateSettle"

This variant has no additional fields.

curl -X PATCH https://api.tst.au.apgpay.dev/statement-receipt-batches/{statementReceiptBatchId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "SrbatUpdateSettle"
}'

Responses

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

Discriminated by type
type = "SrbatUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "SrbatUpdateRspAttributes",
  "updated": {
    "type": "SrbatViewAttributes",
    "statementReceiptBatchId": "srbat_9f2Kd8QpLzXw",
    "requestReference": "your-own-reference",
    "bankChannelName": "Ada Lovelace",
    "fileName": "Ada Lovelace",
    "transactionCount": 42,
    "transactionAmount": {
      "type": "IsoCurrencyAmount",
      "minorCurrencyUnits": 1250,
      "currency": "AUD"
    },
    "bankProcessDate": "2026-08-19T04:21:07Z",
    "fileGenerateStatus": "Waiting",
    "fileDealStatus": "Waiting",
    "bankReference": "your-own-reference",
    "paymentMethod": "string",
    "remark": "string",
    "errorMessage": "string",
    "receipts": [
      {
        "type": "SrcptViewAttributes",
        "statementReceiptId": "srcpt_9f2Kd8QpLzXw",
        "requestReference": "your-own-reference",
        "loanStatementId": "lstmt_9f2Kd8QpLzXw",
        "statementReceiptBatchId": "srbat_9f2Kd8QpLzXw",
        "amount": {
          "type": "IsoCurrencyAmount",
          "minorCurrencyUnits": 1250,
          "currency": "AUD"
        },
        "status": "Waiting",
        "acknowledgement": "Waiting",
        "receivedAt": "2026-08-19T04:21:07Z",
        "remark": "string",
        "errorMessage": "string",
        "uploadFilePaths": [
          "string"
        ],
        "paymentMethod": "string",
        "createdAt": "2026-08-19T04:21:07Z",
        "updatedAt": "2026-08-19T04:21:07Z"
      }
    ],
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses