# List, retrieve, then reverse (cancel) a card refund.

List, retrieve, then reverse (cancel) a card refund.

1. OPTIONAL — list card refunds filtered by terminal, order, status, and date. The response is paginated - refunds are in the `data` array. This step extracts the first refund's `refundId` for the follow-on steps.
 [listRefunds](/api/list-refunds)
2. OPTIONAL — retrieve the full detail of the first card refund from the list. Inspect `supportedOperations` and `transactionResult.status` to confirm the refund can be reversed before acting.
 [getRefund](/api/get-refund)
3. Cancel the card refund while it is in an open batch using the `refundId` from getRefund; no funds are returned to the cardholder. Requires a unique `Idempotency-Key` header. Returns 200 with `transactionResult.status` == `reversal`.
 [reverseRefund](/api/reverse-refund)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. refund search · API"]
  step1["2. refund lookup · API"]
  step0 --> step1
  step2["3. reversal request · API"]
  step1 --> step2
```
