Reverse refund
Use this method to cancel a bank transfer refund in an open batch.
To cancel a refund, you need its refundId. Our gateway returned the refundId in the response of the [Refund Payment](https://docs.payroc.com/api/schema/bank-transfer-payments/refunds/refund) or [Create Refund](https://docs.payroc.com/api/schema/bank-transfer-payments/refunds/create) method.
**Note:** If you don’t have the refundId, use our [List Refunds](https://docs.payroc.com/api/schema/bank-transfer-payments/refunds/list) method to search for the refund.
If your request is successful, the gateway removes the refund from the merchant’s open batch, and no funds are returned to the cardholder’s account.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
refundId
Unique identifier that our gateway assigned to the refund.
Headers
Idempotency-Key
Unique identifier that you generate for each request. You must use the [UUID v4 format](https://www.rfc-editor.org/rfc/rfc4122) for the identifier. For more information about the idempotency key, go to [Idempotency](https://docs.payroc.com/api/idempotency).
Response
Successful request. We reversed the refund transaction.
refundId
Unique identifier that our gateway assigned to the refund.
processingTerminalId
Unique identifier that we assigned to the terminal.
order
Object that contains information about the order.
bankAccount
Object that contains information about the bank account.
transactionResult
Object that contains information about the transaction.
customer
Object that contains information about the customer.
payment
Object that contains information about a payment.
customFields
Array of customField objects.