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

# Get Refund Payments | Refunds API

> Retrieve refund payments via the Atoa Refunds API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

This API is used to get the refund details for a given payment request id. It returns information about the refund transaction including the amount, status, and related payment details.

### Authorization

Bearer `<token>`

> [!NOTE]
>
> Using a sandbox token with a production payment request ID, or a production
> token with a sandbox payment request ID, will result in an error.

**Request Body Schema**

**paymentRequestId** `string` *required*

The payment request id is required for this step, which you'll receive it from
the process-payment API when generating a payment request.

**Response**

The API returns a refund payment object with the following fields:

**refundId** `string`

A unique UUID for the refund transaction.

**paymentRequestId** `string`

The ID of the original payment request. Refer to
[process-payment](https://docs.paywithatoa.com/api-reference/payment/process-payment.md)

**paymentIdempotencyId** `string`

The unique identifier for the payment transaction.

**status** `string`

The current status of the refund payment \
&#x20;(e.g.,
INITIATED,PENDING,COMPLETED,FAILED) - INITIATED : The refund request has been
raised - PENDING : The refund is being ready to be processed - COMPLETED : The
refund payment has been completed - FAILED : The refund payment has failed -
CANCELLED : The refund payment has been cancelled

**paidAmount** `number`

The original amount that was paid.

**refundAmount** `number`

The amount that was refunded.

**currency** `string`

The three-letter currency code (e.g., GBP).

**refundNotes** `string`

The notes associated with the refund.

**orderId** `string`

The ID of the order associated with this refund.

**refundType** `string`

The type of refund (e.g., PARTIAL, FULL).

**createdAt** `string`

The timestamp when the refund was created.

**updatedAt** `string`

The timestamp when the refund was last updated.

**metadata** `object`

Only present when metadata was supplied on the refund. See [Initiate Refund](https://docs.paywithatoa.com/api-reference/refund/initiate-refund.md) for the field limits.

```json 200 theme={null}
[
  {
    "refundId": "a7c82e45-9f31-42b6-8d15-7e63f1b92c4d",
    "paymentRequestId": "5e8b2c73-1f64-4a97-9c38-d2f6ae15b8c2",
    "paymentIdempotencyId": "ATOA1234567890123",
    "status": "INITIATED",
    "paidAmount": "250.75",
    "refundAmount": "25.50",
    "currency": "GBP",
    "refundNotes": "Customer requested refund",
    "orderId": "987654321",
    "refundType": "PARTIAL",
    "createdAt": "2023-11-15T14:32:45.789Z",
    "updatedAt": "2023-11-15T14:32:45.789Z",
    "metadata": {
      "refundReason": "damaged-item",
      "ticketId": "SUP-9981"
    }
}
]
```

```json 400 theme={null}
{
  "name": "BAD_REQUEST",
  "status": 400,
  "message": "No payment request found",
  "errors": []
}
```

```json 401 theme={null}
{
  "name": "UNAUTHORIZED",
  "message": "Unauthorized",
  "status": 401,
  "errors": "[]"
}
```

```json 404 theme={null}
{
  "name": "NOT_FOUND",
  "message": "No refunds found for this payment request",
  "status": 404,
  "errors": []
}
```


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