APG PayAPG Paydocs

Loans

Update loan facility

PATCH/loan-facilities/{loanFacilityId}

Add funds to a facility, change the business it lends on behalf of, or set where its statements ask to be paid and the mark they are drawn with. The business profile is merged over what is stored.

6 actionsLfacUpdateBrandingLfacUpdateBusinessProfileLfacUpdateClearBrandingLfacUpdateClearStatementReceivingAccountsLfacUpdateStatementReceivingAccountsLfacUpdateTopUp

Permissions

Required permission
loanFacilities:update

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

Path parameters

loanFacilityIdstring
required

Request body

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

Discriminated by type
type = "LfacUpdateBranding"

The facility's own mark, the one a bill is issued under. A merchant's co-branded mark is a different field on the merchant.

curl -X PATCH https://api.tst.au.apgpay.dev/loan-facilities/{loanFacilityId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "LfacUpdateBranding",
  "branding": {
    "type": "LfacBrandingAttributes",
    "logoUri": "https://example.com/callback"
  }
}'

Responses

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

Discriminated by type
type = "LfacUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "LfacUpdateRspAttributes",
  "updated": {
    "type": "LfacViewAttributes",
    "loanFacilityId": "lfac_9f2Kd8QpLzXw",
    "enterpriseId": "ent_9f2Kd8QpLzXw",
    "description": "string",
    "status": "Active",
    "balances": {
      "type": "LfacBalancesAttributes",
      "currency": "AUD",
      "available": 1250,
      "used": 1250,
      "reserved": 1250
    },
    "timeZone": "string",
    "businessProfile": {
      "type": "LfacBusinessProfileAttributes",
      "legalName": "Ada Lovelace",
      "businessNumber": "string",
      "taxRegistrationNumber": "string",
      "taxCountry": "AU",
      "tradingCountry": "AU",
      "contactEmail": "ada@example.com",
      "contactPhone": "+61400000000",
      "website": "string"
    },
    "statementReceivingAccounts": [
      {
        "type": "LfacReceivingAccountRuleAttributes",
        "productLines": [
          "CentralPay"
        ],
        "paymentMethods": [
          "DirectDebit"
        ],
        "account": {
          "type": "LfacBankAccountAttributes",
          "bsbNumber": "string",
          "accountNumber": "string",
          "bankName": "Ada Lovelace",
          "branch": "string",
          "swiftCode": "string"
        }
      }
    ],
    "branding": {
      "type": "LfacBrandingAttributes",
      "logoUri": "https://example.com/callback"
    },
    "referenceLoanFacilityId": "your-own-reference",
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses