> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Refund payment Action

## What does this Action do?

The "Refund payment" Action is responsible for sending the refund request. It enables you to define rules where you wish to perform an automated refund.

Learn more about refunding payments [here](https://primer.io/docs/manage-payments/refund-payment.md).

![Workflow example](https://mintcdn.com/primer-cc826789/sTKljbqk0yjiDnE9/images/workflows/refund-payment/refund.png?fit=max\&auto=format\&n=sTKljbqk0yjiDnE9\&q=85\&s=5fd488479f54fb31f4cc20288c55372b)

Workflow example

> [!WARNING]
>
> If the payment is not in the SETTLED state, you will not be able to perform a refund.

## How to use the Action

* Assign a `payment ID` - this will usually be the "Payment ID" from the ["Payment created" Trigger](https://primer.io/docs/workflows/apps/native-apps/primer-payments-app/payment-created-trigger.md) output or ["Payment status updated" Trigger](https://primer.io/docs/workflows/apps/native-apps/primer-payments-app/payment-status-updated-trigger.md) output
* \[Optional] Set `reason`, which can be used for your own records
* \[Optional] Set `amount` if you wish to [partial refund](https://primer.io/docs/manage-payments/refund-payment.md#partial-refund)

> [!NOTE]
>
> Refunds are usually processed asynchronously. Once the refund request has been made, the refund, and movement of funds back to the customer, will occur and could take days. Learn more [here](https://primer.io/docs/manage-payments/capture-payment.md#handle-asynchronous-capture) and how to handle these scenarios.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.