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

# Refunds

> Create refunds from credit notes, read, update and delete them, and manage the notes and files on them.

A refund pays money back to an account out of a credit note. This area has 12 endpoints: create a refund from a credit note, read, update and delete refunds, and manage their notes and files. Every SDK supports all of them.

## At a glance

| Endpoint | Method | Path | What it does |
| - | - | - | - |
| [List refunds](https://exsited.mintlify.site/api-reference/refunds/list-refunds.md) | GET | `/refunds` | Returns one page of refunds. |
| [Delete a refund](https://exsited.mintlify.site/api-reference/refunds/delete-a-refund.md) | DELETE | `/refunds/{refund_id}` | Deletes a refund. |
| [Retrieve a refund](https://exsited.mintlify.site/api-reference/refunds/retrieve-a-refund.md) | GET | `/refunds/{refund_id}` | Returns one refund by its code. |
| [Update a refund](https://exsited.mintlify.site/api-reference/refunds/update-a-refund.md) | PATCH | `/refunds/{refund_id}` | Changes a refund's reference or note and returns the refund. |
| [Create a refund from a credit note](https://exsited.mintlify.site/api-reference/refunds/create-a-refund-from-a-credit-note.md) | POST | `/credit_notes/{credit_note_id}/refunds` | Refunds part or all of a credit note and returns the new refund. |
| [List a refund's notes](https://exsited.mintlify.site/api-reference/refunds/list-a-refunds-notes.md) | GET | `/refunds/{refund_id}/notes` | Returns one page of the notes on a refund. |
| [Retrieve a refund note](https://exsited.mintlify.site/api-reference/refunds/retrieve-a-refund-note.md) | GET | `/refunds/{refund_id}/notes/{note_id}` | Returns one note on a refund. |
| [Create a refund note](https://exsited.mintlify.site/api-reference/refunds/create-a-refund-note.md) | POST | `/refunds/{refund_id}/notes` | Adds a note, and optionally a file, to a refund and returns the note. |
| [Delete a refund note](https://exsited.mintlify.site/api-reference/refunds/delete-a-refund-note.md) | DELETE | `/refunds/{refund_id}/notes/{note_id}` | Deletes a note from a refund. |
| [List a refund note's files](https://exsited.mintlify.site/api-reference/refunds/list-a-refund-notes-files.md) | GET | `/refunds/{refund_id}/notes/{note_id}/files` | Returns the files attached to a note on a refund. |
| [Retrieve a refund note file](https://exsited.mintlify.site/api-reference/refunds/retrieve-a-refund-note-file.md) | GET | `/refunds/{refund_id}/notes/{note_id}/files/{file_id}` | Returns the details of one file attached to a refund note, not the file's contents. |
| [Delete a refund note file](https://exsited.mintlify.site/api-reference/refunds/delete-a-refund-note-file.md) | DELETE | `/refunds/{refund_id}/notes/{note_id}/files/{file_id}` | Deletes one file from a note on a refund. |

## Before you call

Register your API credentials once when your app starts, as shown in
[Authentication](https://exsited.mintlify.site/authentication.md). Every SDK sample on these pages then gets its client in one line.
With cURL, send the access token in an `Authorization` header: `Authorization: Bearer $ACCESS_TOKEN`.

## Things to know

* **Identify a refund by its code.** `{refund_id}` is the code the refunds listing returns as `id`.
* **A refund comes from a credit note.** Create one under the credit note, identified by its `code`, with `amount` and `payment_method` under `refund`.
* **Amounts are strings.** A refund's `amount` reads like `"2.00"`.
* **Note deletes check the create permission.** Deleting a refund note or its file needs `CREATE_REFUND_NOTE`; without it the call returns `403`.
* **Listings page by cursor.** Records are under `data`. Pass `pagination.next_cursor` back as `cursor` while `pagination.has_more` is `true`.


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