# Retrieve a returned ACH payment, then close the return.

Retrieve a returned ACH payment, then close the return.

1. Retrieve the original bank transfer payment by its paymentId so the return's own paymentId can be read. The response returns array holds one entry per return, each with its own paymentId, returnCode and returnReason. Capture returns/0/paymentId - that is the id required to close the return, NOT the top-level paymentId.
 [getBankTransferPayment](/api/get-bank-transfer-payment)
2. Close the return permanently. Takes the return's paymentId in the path (from the previous step's returnPaymentId, i.e. returns/0/paymentId - not the original payment's id) and a required Idempotency-Key header. This endpoint has no request body. Success returns the bank transfer payment.
 [closeBankTransferPayment](/api/close-bank-transfer-payment)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. payment lookup · API"]
  step1["2. close return request · API"]
  step0 --> step1
```
