***

title: Refunds
icon: repeat
published: true
---------------------

For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.payroc.com/full-stack-guides/take-payments/payments/llms.txt. For full documentation content, see https://docs.payroc.com/full-stack-guides/take-payments/payments/llms-full.txt.

When a customer returns an item or requests money back, the merchant can run a refund to return a payment to the customer’s account if it is in a closed batch or cancel the payment if it is in an open batch.

Our gateway supports two types of refund:

* Referenced refund
* Unreferenced refund

## Referenced refund

Our gateway uses the payment details from the original payment to return the payment to the customer. If the payment is in an open batch, the gateway automatically cancels the payment. If the payment is in a closed batch, the gateway refunds the payment.

### Example

A customer returns an item to the merchant and wants a refund. The merchant uses their POS to look up the original sale and run a refund against the sale.

## Unreferenced refund

If there is no previous payment or the customer payment details have expired, you need to provide our gateway with the customer’s new payment details so that we know where to send the funds to.

### Example

A customer returns an item to the merchant and wants a refund. However, their original payment details have expired. The merchant uses their new payment details to run an unreferenced refund.

## Reversal

If the customer’s payment is in an open batch, the merchant can cancel the payment before we process it. This is known as a reversal.

<Note>
  **Note:** Although there is a discrete endpoint to reverse a payment, if you send a refund request to our refund endpoint, our gateway automatically cancels the payment if it is in an open batch.
</Note>

## Guides

<CardGroup cols={2}>
  <Card title="Send a referenced refund to a bank account" icon="money-check-edit-alt" href="/guides/integrate/refunds/referenced-refunds/bank">
    Return funds to a customer's bank account with a paymentId.
  </Card>

  <Card title="Reverse a bank transfer payment" icon="fast-backward" href="/guides/integrate/refunds/reversals/bank">
    Cancel a bank transfer payment that's in an open batch.
  </Card>

  <Card title="Send an unreferenced refund to a customer’s bank account" icon="money-check-edit" href="/guides/integrate/refunds/unreferenced-refunds/bank">
    Return funds to a customer's bank account without a paymentId.
  </Card>

  <Card title="Run a referenced refund for a card payment" icon="reply" href="/guides/integrate/refunds/unreferenced-refunds/card">
    Return funds to a customer's account with a paymentId.
  </Card>

  <Card title="Run an unreferenced refund for a card payment" icon="envelope-open-dollar" href="/guides/integrate/refunds/referenced-refunds/card">
    Return funds to a customer's account without a paymentId.
  </Card>

  <Card title="Reverse a card sale or a pre-authorization" icon="step-backward" href="/guides/integrate/refunds/reversals/card">
    Cancel a card sale or a pre-authorization that's in an open batch.
  </Card>
</CardGroup>