# Get refund

> GET `/secure/refunds/getrefund`
> Part of the Payments API reference. Source: https://hub.ozow.com/api-reference/payments-api/get-secure-refunds-getrefund/

Server: `https://api.ozow.com` (Production)

Other environments: `https://stagingapi.ozow.com` (Staging)

 Query a refund using the Ozow refund identifier.

## Authentication

- `BearerToken` (HTTP bearer)
  - The token generated by the `Get API token` operation. The same token is used for every request until it expires.

## Query parameters

- `refundId` (string, required) - Ozow's identifier for the refund. This identifier is passed back to the merchant in the SubmitRefunds response’s RefundId field.

## Responses

### 200 OK

**application/json**

- `id` (string, uuid, required) - The identifier for the refund.
- `createdDate` (string, date-time, required) - The date the refund was created.
- `createdDateUtc` (string, date-time, required) - The UTC date the refund was created.
- `merchantCode` (string, required) - Corresponding merchant code of the refund.
- `siteCode` (string, required) - Corresponding site code of the refund.
- `siteName` (string, required) - Corresponding site name of the refund.
- `bankToName` (string, required) - Bank the refund was sent to.
- `currencyCode` (string, required, max length 3) - Refund currency.
- `amount` (number, double, required) - Refund amount.
- `statementReference` (string, required) - Bank reference of the refund for the payer.
- `status` (integer, required) - Refund status. Possible values are: * 0 - Pending - The refund request has been submitted and accepted. * 1 - Complete - The refund has been paid successfully. * 2 - Submitted - The refund has been assigned to a batch and is being processed. * 3 - Failed - The refund payment has failed. * 4 - Cancelled - The refund has been cancelled before it was submitted. * 5 - Returned - The refund payment has been returned because the account that was being refunded no longer exists.
- `toAccount` (string, required) - Account number refund was sent to.
- `paymentDate` (string, date-time, required) - Payment date of the refund.
- `transactionReference` (string, required) - Reference of the transaction which was refunded.
- `customer` (string) - Refunded transaction customer.
- `lastEvent` (string, required) - Most recent log activity of the refund.
- `refundCompletedDate` (string, date-time) - The date the refund was completed.
- `createdBy` (string, required) - Name of the user who created the refund.
- `isRtc` (boolean, required) - `True` if the refund was paid via RTC.

**application/xml**

`Refund`, the same schema listed in full earlier in this document. Its own page: https://hub.ozow.com/api-reference/payments-api/schemas/refund.md

### 400 Bad Request. The operation could not be carried out. The body is a message rather than a structured error.

string

Example (example 1):

```json
There was an error processing your request
```

### 401 Unauthorized. The `ApiKey` header is missing or does not match the site, or for a `Secure` operation the bearer token is missing, expired or invalid.

string

Example (example 1):

```json
API key is missing or invalid.
```
