APG PayAPG Paydocs

Settlement

List merchant invoices

GET/merchant-invoices
Request
GEThttps://api.tst.au.apgpay.dev/merchant-invoices
curl -X GET https://api.tst.au.apgpay.dev/merchant-invoices \
  -H "Authorization: Bearer $API_KEY"

Return a page of invoices. Filter by invoiceReference to find the one printed on a paper invoice, or by the two date pairs, issued, or falling due. The filters combine with each other and with q by AND. GET /filter-catalogues/merchant-invoices lists those this caller can use. A cursor continues only the walk that issued it: sent with different filters, q or sort, it is refused with 400.

Permissions

Required permission
merchantFinancials:query

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

Query parameters

qstring

Search. Matches an invoice id, the id of its order, or the narrative. An id, an email address, a phone number and any value listed as matched exactly match exactly; any other term matches without regard to case from the start of a value (or of any word in it, beside a longer word of the term), or anywhere in it from three characters, every word of it somewhere; a term that matches nothing so is read again with typos tolerated. Closest matches come first unless sort is given.

pageinteger (int32)

Offset pagination: 1-based page number. Mutually exclusive with the cursor parameters.

startingAfterstring

Cursor pagination, moving forward: the id of the last item on the current page. Mutually exclusive with page.

endingBeforestring

Cursor pagination, moving backward: the id of the first item on the current page. Mutually exclusive with page.

limitinteger (int32)

Maximum items per page.

sortarray of MinvSort

Fields to sort by, comma-delimited, in priority order. Prefix a field with - for descending.

columnsarray of MinvColumn

Columns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.

merchantInvoiceIdone of array of string, string

Only invoices whose invoice is one of these. Repeat the parameter to give several.

merchantIdstring

Filter to one merchant's invoices.

marketplaceIdstring

Filter to one marketplace's merchants.

enterpriseIdstring

Filter to one enterprise.

statusone of MinvStatus, array of MinvStatus

Only invoices whose status is one of these. Repeat the parameter to give several.

invoiceReferencestring

Find an invoice by the reference printed on it. Resolved to the invoice's identifier.

issuedOnFromstring (date)

Only invoices whose issue day is at or after this ISO-8601 date.

issuedOnTostring (date)

Only invoices whose issue day is at or before this ISO-8601 date.

dueOnFromstring (date)

Only invoices whose due day is at or after this ISO-8601 date.

dueOnTostring (date)

Only invoices whose due day is at or before this ISO-8601 date.

Responses

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

Discriminated by type
type = "MinvPageAttributes"
hasMorebooleanrequired

Whether further items exist after this page.

Example true

nextStartingAfterstring

Id to pass as startingAfter to fetch the next page. Present in cursor mode only.

totalCountinteger (int64)

Total items matching the query.

Example 42

pageinteger (int32)

The 1-based page returned. Present in offset mode only.

Example 1250

totalPagesinteger (int32)

Total pages available. Present in offset mode only.

Example 1250

Example
{
  "type": "MinvPageAttributes",
  "data": [
    {
      "type": "MinvViewAttributes",
      "merchantInvoiceId": "minv_9f2Kd8QpLzXw",
      "reference": "your-own-reference",
      "payerMerchantId": "mcht_9f2Kd8QpLzXw",
      "payerName": "Ada Lovelace",
      "payeeMerchantId": "mcht_9f2Kd8QpLzXw",
      "payerMarketplaceId": "mktp_9f2Kd8QpLzXw",
      "payerEnterpriseId": "ent_9f2Kd8QpLzXw",
      "status": "Draft",
      "amounts": {
        "type": "MinvAmountsAttributes",
        "currency": "AUD",
        "invoiced": 1250,
        "paid": 1250,
        "outstanding": 1250
      },
      "periodStart": "2026-08-19",
      "periodEnd": "2026-08-19",
      "dueDate": "2026-08-19",
      "issuedOn": "2026-08-19",
      "narrative": "string",
      "orderId": "ordr_9f2Kd8QpLzXw",
      "ledgerClearance": {
        "type": "MinvLedgerClearanceAttributes",
        "systemLedgerId": "string",
        "firstSequence": 1250,
        "lastSequence": 1250
      },
      "payments": [
        {
          "type": "MinvPaymentAbandoned",
          "at": "2026-08-19T04:21:07Z",
          "summary": "string"
        }
      ],
      "items": [
        {
          "type": "MinvItemAttributes",
          "itemType": "PayInFullFee",
          "category": "string",
          "categoryLabel": "string",
          "unitPrice": "string",
          "count": 42,
          "transactionValue": 1250,
          "fees": 1250,
          "tax": 1250
        }
      ],
      "billing": {
        "type": "MinvBillingAttributes",
        "businessName": "Ada Lovelace",
        "taxId": "string",
        "emailAddress": "ada@example.com",
        "phoneNumber": "+61400000000",
        "address": {
          "type": "PsonAddressAttributes",
          "unitNumber": "string",
          "streetNumber": "string",
          "streetName": "Ada Lovelace",
          "streetType": "string",
          "suburb": "string",
          "city": "string",
          "state": "string",
          "postalCode": "3000",
          "country": "AU"
        }
      },
      "manualPayment": {
        "type": "MinvManualPaymentAttributes",
        "token": "tok_9f2Kd8QpLzXwR4mN",
        "paymentUrl": "https://example.com/callback",
        "orderId": "ordr_9f2Kd8QpLzXw"
      },
      "createdAt": "2026-08-19T04:21:07Z",
      "updatedAt": "2026-08-19T04:21:07Z"
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses