> For the complete documentation index, see [llms.txt](https://apidocs.onekeypayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.onekeypayments.com/api-reference/deposits-api/manage-refunds/api-codes.md).

# API Codes

## Refunds Status Codes

<table><thead><tr><th width="164.12890625" align="center">Status</th><th>Description</th></tr></thead><tbody><tr><td align="center"><img src="https://docs.d24.com/~gitbook/image?url=https%3A%2F%2F773174111-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-M792I7hN0PzC-Sx95CP%252F-M9UZX6c7bK760aeWd8v%252F-M9Uq6hh3MZ301JtlBh4%252FUntitled%2520Diagram.svg%3Falt%3Dmedia%26token%3D41bf91d1-9560-4eca-ae31-31076fa4318a&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=99f75ee0&#x26;sv=2" alt=""></td><td>The refund is created and is pending to be processed. It can still be cancelled.</td></tr><tr><td align="center"><img src="https://docs.d24.com/~gitbook/image?url=https%3A%2F%2F773174111-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-M792I7hN0PzC-Sx95CP%252F-ME_it9RCwyTvOUoIo0B%252F-ME_izqMi9S4uIPsWPjR%252FINCORRECT_DETAILS.svg%3Falt%3Dmedia%26token%3D718ee56e-b310-4af2-823a-c4757a10074c&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=ac2c8034&#x26;sv=2" alt=""></td><td>The refund is pending for you to provide more information. It can still be cancelled.</td></tr><tr><td align="center"><img src="https://docs.d24.com/~gitbook/image?url=https%3A%2F%2F773174111-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-M792I7hN0PzC-Sx95CP%252F-MDQhuymM4s9sd0oJVff%252F-MDQyQCx2cX3EhoAitEv%252FDELIVERED.svg%3Falt%3Dmedia%26token%3D67fe9880-6e82-4ede-a6dc-0fec57957d0c&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=d2cbebf5&#x26;sv=2" alt=""></td><td>The refund has been sent to the bank for processing. It can't be cancelled anymore.</td></tr><tr><td align="center"><img src="https://docs.d24.com/~gitbook/image?url=https%3A%2F%2F773174111-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-M792I7hN0PzC-Sx95CP%252F-M9UZX6c7bK760aeWd8v%252F-M9UsJ4Co_cg-RzJZT6c%252FCANCELLED.svg%3Falt%3Dmedia%26token%3D740308bc-8d16-47b4-b463-5dcb696664f5&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=df784135&#x26;sv=2" alt=""></td><td>The refund has been manually cancelled. Final status.</td></tr><tr><td align="center"><img src="https://docs.d24.com/~gitbook/image?url=https%3A%2F%2F773174111-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-M792I7hN0PzC-Sx95CP%252F-MDNUC8kDzO5zBOAMZA5%252F-MDNZ67x7s7LgmAyG4YI%252FREJECTED.svg%3Falt%3Dmedia%26token%3D518f2509-3918-48ca-9581-cbbc31063cf2&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=35a8a22a&#x26;sv=2" alt=""></td><td>The refund has been rejected by the bank. Final status.</td></tr><tr><td align="center"><br><img src="https://docs.d24.com/~gitbook/image?url=https%3A%2F%2F773174111-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-M792I7hN0PzC-Sx95CP%252F-M9UZX6c7bK760aeWd8v%252F-M9UsDlL5PDQXBDL5CUD%252FCOMPLETED.svg%3Falt%3Dmedia%26token%3D92d1f295-7b3c-4ad5-b0ce-eb123df5b7ed&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=64c96210&#x26;sv=2" alt=""></td><td>The refund has been completed. Final status.</td></tr></tbody></table>

{% hint style="success" %}
Use the [Refund status endpoint](/api-reference/deposits-api/manage-refunds/get-refund-status.md) to retrieve the status of a refund.
{% endhint %}

***

### Refund API Error Codes

<table><thead><tr><th width="109.99609375" align="center">API Code</th><th width="120.53125" align="center">HTTP Code</th><th width="150.54296875" align="center">Type</th><th width="175.78515625">Message</th><th width="233.9609375">Description</th></tr></thead><tbody><tr><td align="center">800</td><td align="center">400</td><td align="center"><code>REFUND_NOT_ENABLED</code></td><td>Refund is not enabled</td><td>Your Merchant account doesn't have the refund capability enabled. Check with your Account Manager</td></tr><tr><td align="center">801</td><td align="center">400</td><td align="center"><code>DEPOSIT_NOT_COMPLETED</code></td><td>Refund cannot be applied since deposit is not in status completed</td><td>The refunds can only be applied over COMPLETED deposits</td></tr><tr><td align="center">802</td><td align="center">400</td><td align="center"><code>INVALID_AMOUNT_TO_REFUND</code></td><td>Amount to refund not valid</td><td>The amount to refund is not valid. Check if the amount is negative or bigger than the deposit itself.</td></tr><tr><td align="center">803</td><td align="center">400</td><td align="center"><code>INSUFFICIENT_FUNDS</code></td><td>Insufficient funds</td><td>Your Merchant account doesn't have enough funds to cover for the refund amount</td></tr><tr><td align="center">804</td><td align="center">400</td><td align="center"><code>MISSING_BANK_ACCOUNT</code></td><td>Missing bank account information</td><td>The bank account information is missing</td></tr><tr><td align="center">805</td><td align="center">400</td><td align="center"><code>ERROR_IN_REFUND</code></td><td>Error, the refund was not processed. {details}</td><td>The refund could not be completed. Flag it for review on our Merchant Panel for further information</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://apidocs.onekeypayments.com/api-reference/deposits-api/manage-refunds/api-codes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
