APG PayAPG Paydocs

Loans

Update loan transaction

PATCH/loan-transactions/{loanTransactionId}

Publish an authorised movement to the balance, or cancel it.

3 actionsLtxnUpdateCancelLtxnUpdateCaptureLtxnUpdatePublish

Permissions

Required permission
loanTransactions:update

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

Path parameters

loanTransactionIdstring
required

Request body

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

Discriminated by type
type = "LtxnUpdateCancel"

This variant has no additional fields.

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

Responses

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

Discriminated by type
type = "LtxnUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "LtxnUpdateRspAttributes",
  "updated": {
    "type": "LtxnViewAttributes",
    "loanTransactionId": "ltxn_9f2Kd8QpLzXw",
    "loanId": "loan_9f2Kd8QpLzXw",
    "loanProductId": "lprod_9f2Kd8QpLzXw",
    "loanFacilityId": "lfac_9f2Kd8QpLzXw",
    "merchantId": "mcht_9f2Kd8QpLzXw",
    "customerId": "cust_9f2Kd8QpLzXw",
    "status": "Authorised",
    "amounts": {
      "type": "LtxnAmountsAttributes",
      "currency": "AUD",
      "authorised": 1250,
      "captured": 1250,
      "published": 1250,
      "publishedTax": 1250,
      "taxType": "string"
    },
    "specification": {
      "type": "LtxnSpecCardCharge",
      "currency": "AUD",
      "issuerTransactionId": "itxn_9f2Kd8QpLzXw",
      "cardId": "dcard_9f2Kd8QpLzXw",
      "realtimeSettlement": true,
      "authorisedAt": "2026-08-19T04:21:07Z",
      "capturedOrCancelledAt": "2026-08-19T04:21:07Z",
      "publishedAt": "2026-08-19T04:21:07Z",
      "originalAmount": {
        "type": "IsoCurrencyAmount",
        "minorCurrencyUnits": 1250,
        "currency": "AUD"
      },
      "lineItems": [
        {
          "type": "LtxnLineItemAttributes",
          "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"
          },
          "source": "GeneratedSummary"
        }
      ],
      "refunds": [
        {
          "type": "LtxnRefundAttributes",
          "refundId": "rfnd_9f2Kd8QpLzXw",
          "amounts": {
            "type": "LtxnRefundAmountsAttributes",
            "currency": "AUD",
            "amount": 1250,
            "tax": 1250,
            "taxType": "string"
          },
          "published": true,
          "originalAmount": {
            "type": "IsoCurrencyAmount",
            "minorCurrencyUnits": 1250,
            "currency": "AUD"
          },
          "refundedAt": "2026-08-19T04:21:07Z",
          "publishedAt": "2026-08-19T04:21:07Z",
          "loanStatementId": "lstmt_9f2Kd8QpLzXw"
        }
      ],
      "disputes": [
        {
          "type": "LtxnDisputeAttributes",
          "disputeId": "dispute_9f2Kd8QpLzXw",
          "outcome": "Pending",
          "amount": 1250,
          "originalAmount": {
            "type": "IsoCurrencyAmount",
            "minorCurrencyUnits": 1250,
            "currency": "AUD"
          },
          "reason": "Requested by the customer.",
          "raisedAt": "2026-08-19T04:21:07Z",
          "concludedAt": "2026-08-19T04:21:07Z",
          "loanStatementId": "lstmt_9f2Kd8QpLzXw"
        }
      ],
      "adjustments": [
        {
          "type": "LtxnAdjustmentAttributes",
          "adjustmentId": "string",
          "amounts": {
            "type": "LstmtEntryAmountsAttributes",
            "currency": "AUD",
            "total": 1250,
            "tax": 1250,
            "net": 1250
          },
          "description": "string",
          "adjustedAt": "2026-08-19T04:21:07Z",
          "loanStatementId": "lstmt_9f2Kd8QpLzXw"
        }
      ]
    },
    "loanStatementIds": [
      "lstmt_9f2Kd8QpLzXw"
    ],
    "referenceLoanTransactionId": "your-own-reference",
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses