> For the complete documentation index, see [llms.txt](https://developer.redstonepgs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.redstonepgs.com/api-documentation/payments/refund.md).

# Refund

This endpoint is used to process refunds for payments. It allows for both partial and full refunds based on the specified amount. It is important to ensure that the amount provided does not exceed the total amount associated with the given payment\_reference.

<mark style="color:green;">POST</mark>  /v1/payment/refunds/process

#### Headers

| Name       | Type   | Description               |
| ---------- | ------ | ------------------------- |
| secret-key | string | Your Redstone  secret key |
| public-key | String | Your Redstone  public key |

#### Request body

* amount (number): The amount to be refunded. This value must not be greater than the amount associated with the specified payment reference.
* payment\_reference (string): The reference of the payment that needs to be refunded. This should match the original payment reference.
* reason (string): The reason for the refund.

#### Request

For example, you can make a post request to the endpoint above and pass in the **raw json data** below.

```
{
     "amount":1,
    "country":"Zambia",
    "currency":"ZMW",
    "narration":"testing",
    "transfer_to":"mobile_number",
    "email":"",
    "payment_reference":"{{reference}}",
    "webhook_url":"{{webhook_url}}",
    "momo_phone_number":"{{phone_number}}",
}

```

#### Response

```
{
    "status": "success",
    "code": 200,
    "message": "refund queued successfully",
    "data": {
        "status": "pending",
        "message": "refund queued successfully",
        "reference": ""
    }
}
```
