# Referenced refund of an existing bank-transfer / ACH payment.

Referenced refund of an existing bank-transfer / ACH payment.

1. OPTIONAL — searches for the original bank-transfer payment when you do not have its paymentId (GET /bank-transfer-payments). `processingTerminalId` is a required query parameter here. Skip this step when you already hold the paymentId. Take the paymentId of the matching result from `data/0/paymentId`.
 [listBankTransferPayments](/api/list-bank-transfer-payments)
2. OPTIONAL — retrieves the original bank-transfer payment by paymentId (GET /bank-transfer-payments/{paymentId}) to confirm its details and batch status before refunding. An open-batch payment is reversed rather than refunded.
 [getBankTransferPayment](/api/get-bank-transfer-payment)
3. Refunds the referenced bank-transfer payment (POST /bank-transfer-payments/{paymentId}/refund). Requires the Idempotency-Key header and a body with `amount` and `description`. Returns 200 with the refunded payment; the resulting transaction state is in `transactionResult.status` (reversal when the payment was in an open batch).
 [refundBankTransferPayment](/api/refund-bank-transfer-payment)

## Workflow diagram

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