APG PayAPG Paydocs

Loans

Get loan

GET/loans/{loanId}
Request
GEThttps://api.tst.au.apgpay.dev/loans/{loanId}
curl -X GET https://api.tst.au.apgpay.dev/loans/{loanId} \
  -H "Authorization: Bearer $API_KEY"

Return one loan.

Permissions

Required permission
loans:query

Requires the `query` action on `loans` for the supplied runtime context

Path parameters

loanIdstring
required

Responses

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

Discriminated by type
type = "LoanViewAttributes"
loanIdLoanIdrequired

Identifier of a loan.

Example loan_9f2Kd8QpLzXw

merchantIdMchtIdrequired

The merchant borrowing.

Example mcht_9f2Kd8QpLzXw

marketplaceIdMktpId

The marketplace the borrowing merchant trades under, where it does.

Example mktp_9f2Kd8QpLzXw

customerIdCustId

The customer borrowing, on a trading-account loan. A real-time-settlement loan has no customer.

Example cust_9f2Kd8QpLzXw

loanFacilityIdLfacIdrequired

Identifier of a loan facility.

Example lfac_9f2Kd8QpLzXw

loanProductIdLprodIdrequired

Identifier of a loan product.

Example lprod_9f2Kd8QpLzXw

loanAgreementIdLmaId

The master agreement this loan draws under, where the product uses one.

Example lma_9f2Kd8QpLzXw

accountNamestringrequired

What the loan account is called on statements.

Example Ada Lovelace

statusLoanStatusrequired
EnabledDisabledUnknown

The balances on a loan. All are in the single currency given here.

The terms this loan runs on, which kind of loan it is, and what the borrower is charged.

timeZonestringrequired

IANA time zone the loan's statement periods are measured in.

billingPaymentSourceIdPsrcId

The payment source automated billing is charged to.

Example psrc_9f2Kd8QpLzXw

productLineLoanProductLine

APG's product line, which picks the account a bank-transfer statement asks to be paid into. Absent until set, on the application or with LoanUpdateProductLine.

CentralPayVirtualPayTaaB2bSupplyChainUnknown
metadatamap of any JSON value

Free-form data the platform stores and returns untouched.

referenceLoanIdstring

The caller's own reference for this loan.

Example your-own-reference

createdAtstring (date-time)required

Example 2026-08-19T04:21:07Z

updatedAtstring (date-time)required

Example 2026-08-19T04:21:07Z

Example
{
  "type": "LoanViewAttributes",
  "loanId": "loan_9f2Kd8QpLzXw",
  "merchantId": "mcht_9f2Kd8QpLzXw",
  "marketplaceId": "mktp_9f2Kd8QpLzXw",
  "customerId": "cust_9f2Kd8QpLzXw",
  "loanFacilityId": "lfac_9f2Kd8QpLzXw",
  "loanProductId": "lprod_9f2Kd8QpLzXw",
  "loanAgreementId": "lma_9f2Kd8QpLzXw",
  "accountName": "Ada Lovelace",
  "status": "Enabled",
  "balances": {
    "type": "LoanBalancesAttributes",
    "currency": "AUD",
    "limit": 500000,
    "used": 1250,
    "available": 1250,
    "reserved": 1250,
    "pending": 1250
  },
  "specification": {
    "type": "LoanSpecRealtimeSettlement",
    "variableFee": 12.5,
    "setting": "Manual"
  },
  "timeZone": "string",
  "billingPaymentSourceId": "psrc_9f2Kd8QpLzXw",
  "productLine": "CentralPay",
  "metadata": {
    "yourKey": {}
  },
  "referenceLoanId": "your-own-reference",
  "createdAt": "2026-08-19T04:21:07Z",
  "updatedAt": "2026-08-19T04:21:07Z"
}

Error responses