APG PayAPG Paydocs

Transactions

Get refund

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

Return one refund.

Permissions

Required permission
refunds:query

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

Path parameters

refundIdstring
required

Responses

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

Discriminated by type
type = "RfndViewAttributes"
refundIdRfndIdrequired

Identifier of a refund.

Example rfnd_9f2Kd8QpLzXw

The transaction this refund came from, acquiring or issuing.

merchantIdMchtIdrequired

Identifier of a merchant.

Example mcht_9f2Kd8QpLzXw

Who was paid back.

statusRfndStatusrequired
PendingRefundedSettledReversedUnknown

A refund and the transaction it came from. Both are in the single currency given here.

orderIdOrdrId

The order the refunded payment settled.

Example ordr_9f2Kd8QpLzXw

referenceOrderIdstring

Your own reference for that order.

Example your-own-reference

orderMetadatamap of any JSON value

Free-form data carried on the order. Absent unless the principal may read order PII.

payoutIdPayoutId

The 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)required

How many times the platform has attempted this refund with the gateway.

Example 1250

lastErrorstring

What the gateway said when the refund last failed.

createdAtstring (date-time)required

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

refundedAtstring (date-time)

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

updatedAtstring (date-time)required

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

Example
{
  "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"
}

Error responses