> ## 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.

# Cancel Refund | Refunds API

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

This API allows you to cancel a refund that is still in a pending state and has not yet been processed. Once canceled, the refund will not be disbursed to the customer’s bank account.

> [!NOTE]
>
> You can only cancel refunds that are in a pending state and have not been
> processed yet.

> [!NOTE]
>
> Sandbox environment refund cancellations cannot be simulated.

### Authorization

Bearer `<token>`

### Request Body Schema

**refundId** `string` *required*

The unique identifier of the refund you want to cancel. This is the refundId
that was returned when you initiated the refund from&#x20;
[Initiate Refund](https://docs.paywithatoa.com/api-reference/refund/initiate-refund.md).

### Response

**status** `number`

The HTTP status code indicating the result of the operation. A value of 200
indicates success.

**message** `string`

A human-readable message describing the result of the operation.

**refundId** `string`

The unique identifier of the refund that was cancelled.

```json 200 theme={null}
{
  "status": 200,
  "message": "Refund cancelled successfully",
  "refundId": "4fcddd66-4425-4bf7-88cc-96463e279eb1"
}
```

```json 400 theme={null}
{
  "name": "BadRequestException",
  "message": "Refund not found"
}
```


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