# 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": ""
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.redstonepgs.com/api-documentation/payments/refund.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
