> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.paywithatoa.co.uk/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 icon="lightbulb" title="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.
</Note>

**Request Body Schema**

<ParamField path="paymentRequestId" type="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.
</ParamField>

**Response**

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

<ResponseField name="refundId" type="string">
  A unique UUID for the refund transaction.
</ResponseField>

<ResponseField name="paymentRequestId" type="string">
  The ID of the original payment request. Refer to
  [process-payment](../Payment/process-payment)
</ResponseField>

<ResponseField name="paymentIdempotencyId" type="string">
  The unique identifier for the payment transaction.
</ResponseField>

<ResponseField name="status" type="string">
  The current status of the refund payment <br /> (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
</ResponseField>

<ResponseField name="paidAmount" type="number">
  The original amount that was paid.
</ResponseField>

<ResponseField name="refundAmount" type="number">
  The amount that was refunded.
</ResponseField>

<ResponseField name="currency" type="string">
  The three-letter currency code (e.g., GBP).
</ResponseField>

<ResponseField name="refundNotes" type="string">
  The notes associated with the refund.
</ResponseField>

<ResponseField name="orderId" type="string">
  The ID of the order associated with this refund.
</ResponseField>

<ResponseField name="refundType" type="string">
  The type of refund (e.g., PARTIAL, FULL).
</ResponseField>

<ResponseField name="createdAt" type="string">
  The timestamp when the refund was created.
</ResponseField>

<ResponseField name="updatedAt" type="string">
  The timestamp when the refund was last updated.
</ResponseField>

<ResponseField name="metadata" type="object">
  Only present when metadata was supplied on the refund. See [Initiate Refund](/api-reference/Refund/initiateRefund) for the field limits.
</ResponseField>

<ResponseExample>
  ```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": []
  }
  ```
</ResponseExample>
