List refunds
/refundscurl -X GET https://api.tst.au.apgpay.dev/refunds \
-H "Authorization: Bearer $API_KEY"Return a page of refunds, one entry per refund: limit and totalCount count refunds, not the transactions they refund. Supply page for offset pagination or startingAfter for cursor pagination. The filters combine with each other and with q by AND. GET /filter-catalogues/refunds 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. One issued before the list named its walks resumes as it did.
Permissions
refunds:queryRequires the `query` action on `refunds` for the supplied runtime context
Query parameters
qstringSearch. Matches a refund id, the id of the transaction or order it refunds, or the gateway's refund id. 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.
startingAfterstringCursor pagination, moving forward: the id of the last item on the current page. Mutually exclusive with page.
endingBeforestringCursor pagination, moving backward: the id of the first item on the current page. Mutually exclusive with page.
limitinteger (int32)Maximum items per page.
columnsarray of RfndColumnColumns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.
merchantIdone of array of string, stringOnly refunds whose merchant is one of these. Repeat the parameter to give several.
transactionIdone of array of string, stringOnly refunds whose payment is one of these. Repeat the parameter to give several.
customerIdone of array of string, stringOnly refunds whose customer is one of these. Repeat the parameter to give several.
orderIdone of array of string, stringOnly refunds whose order is one of these. Repeat the parameter to give several.
referenceOrderIdstringFilter by your own reference for the order.
amountinteger (int64)Filter to refunds of exactly this amount, in minor units.
currencyone of IsoCurrency, array of IsoCurrencyOnly refunds whose currency is one of these. Repeat the parameter to give several.
createdAfterstring (date-time)Only refunds whose creation time is at or after this ISO-8601 timestamp.
createdBeforestring (date-time)Only refunds whose creation time is at or before this ISO-8601 timestamp.
Responses
The response is a tagged shape: type is always "RfndPageAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.
typetype = "RfndPageAttributes"typeenumrequiredRfndViewAttributesrefundIdRfndIdrequiredIdentifier of a refund.
Example rfnd_9f2Kd8QpLzXw
The transaction this refund came from, acquiring or issuing.
typeenumrequiredRfndSubjectTransactiontransactionIdTranIdrequiredIdentifier of a transaction.
Example tran_9f2Kd8QpLzXw
merchantIdMchtIdrequiredIdentifier of a merchant.
Example mcht_9f2Kd8QpLzXw
Who was paid back.
typeenumrequiredRfndCustomerAttributescustomerIdCustIdIdentifier of a customer.
Example cust_9f2Kd8QpLzXw
namestringThe customer's display name.
Example Ada Lovelace
emailAddressstringAbsent unless the principal may read customer PII.
Example ada@example.com
phoneNumberstringAbsent unless the principal may read customer PII.
Example +61400000000
statusRfndStatusrequiredPendingRefundedSettledReversedUnknownA refund and the transaction it came from. Both are in the single currency given here.
typeenumrequiredRfndAmountsAttributescurrencyIsoCurrencyrequiredAFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
amountMinorUnitsrequiredHow much came back.
Example 1250
transactionAmountMinorUnitsWhat the original transaction was for, beside what came back.
Example 1250
orderIdOrdrIdThe order the refunded payment settled.
Example ordr_9f2Kd8QpLzXw
referenceOrderIdstringYour own reference for that order.
Example your-own-reference
orderMetadatamap of any JSON valueFree-form data carried on the order. Absent unless the principal may read order PII.
payoutIdPayoutIdThe payout this refund was deducted from. Absent unless the principal may read merchant financials.
Example payout_9f2Kd8QpLzXw
settlementDatestring (date)The date the payout carrying this refund settles.
Example 2026-08-19
attemptsinteger (int32)requiredHow many times the platform has attempted this refund with the gateway.
Example 1250
lastErrorstringWhat the gateway said when the refund last failed.
createdAtstring (date-time)requiredExample 2026-08-19T04:21:07Z
refundedAtstring (date-time)Example 2026-08-19T04:21:07Z
updatedAtstring (date-time)requiredExample 2026-08-19T04:21:07Z
hasMorebooleanrequiredWhether further items exist after this page.
Example true
nextStartingAfterstringId 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
{
"type": "RfndPageAttributes",
"data": [
{
"type": "RfndViewAttributes",
"refundId": "rfnd_9f2Kd8QpLzXw",
"subject": {
"type": "RfndSubjectTransaction",
"transactionId": "tran_9f2Kd8QpLzXw"
},
"merchantId": "mcht_9f2Kd8QpLzXw",
"customer": {
"type": "RfndCustomerAttributes",
"customerId": "cust_9f2Kd8QpLzXw",
"name": "Ada Lovelace",
"emailAddress": "ada@example.com",
"phoneNumber": "+61400000000"
},
"status": "Pending",
"amounts": {
"type": "RfndAmountsAttributes",
"currency": "AUD",
"amount": 1250,
"transactionAmount": 1250
},
"orderId": "ordr_9f2Kd8QpLzXw",
"referenceOrderId": "your-own-reference",
"orderMetadata": {
"yourKey": {}
},
"payoutId": "payout_9f2Kd8QpLzXw",
"settlementDate": "2026-08-19",
"attempts": 1250,
"lastError": "string",
"createdAt": "2026-08-19T04:21:07Z",
"refundedAt": "2026-08-19T04:21:07Z",
"updatedAt": "2026-08-19T04:21:07Z"
}
],
"hasMore": true,
"nextStartingAfter": "string",
"totalCount": 42,
"page": 1250,
"totalPages": 1250
}Error responses
statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}