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

# Refund Payments

The payment refund process is the procedure by which you will reimburse a customer for a previous payment. In this guide, you will find instructions on refunding a previously created payment on Yuno.

## Requirements

To refund a payment, you need to:

* Access your [API credentials](/docs/developers-credentials) on the Yuno Dashboard, which consist of:
  * `public-api-key`
  * `private-secret-key`
* Have the payment identification data received after creating the payment using the [Create Payment](/reference/create-payment) endpoint and the capture data from the capture operation executed using the [Capture Payment](/reference/capture-authorization):
  * `id`: The unique identifier of the payment, obtained from the parameter `id` after creating the payment.
  * `transaction_id`: The unique identifier of the transaction. You will use a different source for this information, depending on how you captured the payment.
    * If you created and captured the payment using only one operation, you obtain the `transaction_id` from the parameter `transaction.id` after creating the payment with the [Create Payment](/reference/create-payment) endpoint.
    * If you performed the authorization and then the payment capture, you will use the `transaction_id` from the parameter `id` received after capturing the payment using the [Capture Payment](/reference/capture-authorization) endpoint.

<Note>
  **Explore Yuno Postman Collections**

  Yuno provides [Postman Collections](/reference/postman-collections) that you can use to replicate the use cases locally.
</Note>

## Refund a payment

If you initiate a refund, it will reimburse a charge created earlier but not yet refunded. The amount will be credited back to the original payment method that was charged.

Use the [Refund Payment endpoint with transaction](/reference/refund-payment) to perform the refund. To identify the payment to be refunded, you need to provide its `id` and the `transaction_id`. In case you don't need to return a specific transaction, use the [Refund Payment endpoint](/reference/cancel-or-refund-a-payment) to perform the refund based on payment. In addition, you need to inform the amount to be refunded using the object `amount` in the request body:

* Complete refund: Leave the `amount` empty.
* Partial refund: Provide the refund value using the parameter `amount`.

To confirm you have successfully refunded the payment, check if the parameters from the [Refund Payment endpoint](/reference/refund-payment) response contain the following values:

* `status = REFUNDED`
* `sub_status = REFUNDED`
* `transaction.type = REFUND`
* `transaction.status = SUCCEEDED`

If the response contains the above values, the refund was successful.

<Note>
  **Refund Processing Time**

  Refunds processing time varies depending on the payment type. While in test mode, refunds are processed instantly in the Sandbox environment.
</Note>

### Check the payment status

If, for some reason, you need to confirm the payment refund:

* Use the [Retrieve Payment by ID](/reference/retrieve-payment-by-id) or [Retrieve Payment by merchant\_order\_id](/reference/retrieve-payment-by-merchant-order-id) to get detailed information about the payment.
* Alternatively, set up webhooks to receive notifications for each event. Refer to the [Webhooks](/docs/configure-webhooks) guide to learn how to configure webhooks in Yuno.
