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

# The credit note object

> Offset a paid invoice with an immutable credit document.

<ResponseExample>
  ```json The credit note object theme={null}
  {
    "id": "cn_01JEXAMPLE2K8V4N9C6M1Q7R",
    "object": "credit_note",
    "number": "…",
    "invoice": "inv_01JEXAMPLE2K8V4N9C6M1Q7R",
    "customer": "cus_01JEXAMPLE2K8V4N9C6M1Q7R",
    "status": "issued",
    "reason": "duplicate",
    "total": 2500,
    "amount_refunded": 0,
    "out_of_band_amount": 0,
    "livemode": false
  }
  ```
</ResponseExample>

A Credit note (`cn_…`) is an immutable document issued against a paid [invoice](/api-reference/invoices).
It reduces the invoice's effective balance by the credited amount. A credit note requires a paid invoice,
and your server issues it. See [Credit notes](/guides/credit-notes) for the full flow.

Every credit note carries a gapless, sequential number per merchant and mode (for example `CN-000001`;
test mode uses `TEST-CN-000001`). Once issued, a credit note cannot be edited. It can only be voided.
Platforms can create and manage billing for connected accounts: see [Billing for connected accounts](/guides/connect-billing).

## Attributes

<ResponseField name="id" type="string">
  Credit note id (`cn_…`).
</ResponseField>

<ResponseField name="number" type="string">
  The gapless per-merchant number assigned at creation (for example `CN-000001`).
</ResponseField>

<ResponseField name="invoice" type="string">
  The invoice this credit note offsets (`inv_…`).
</ResponseField>

<ResponseField name="customer" type="string">
  The customer the invoice was issued to (`cus_…`).
</ResponseField>

<ResponseField name="status" type="string">
  `issued` is the normal state after creation; `void` means the credit note has been reversed.
</ResponseField>

<ResponseField name="reason" type="string | null">
  The reason given at creation, or null if none was provided.
</ResponseField>

<ResponseField name="total" type="integer">
  Total credit amount (subtotal + tax), in minor units.
</ResponseField>

<ResponseField name="amount_refunded" type="integer">
  Portion returned via the linked refund, in minor units.
</ResponseField>

<ResponseField name="out_of_band_amount" type="integer">
  Portion settled outside the platform, in minor units.
</ResponseField>

See every field in the response of [Retrieve a credit note](/api-reference/credit-notes/retrieve-a-credit-note).

## Endpoints

| Endpoint | Use it for |
| - | - |
| [Create a credit note](/api-reference/credit-notes/create-a-credit-note) | Issue a credit note against a paid invoice. |
| [Preview a credit note](/api-reference/credit-notes/preview-a-credit-note) | Compute totals and the invoice's creditable remainder without saving anything. |
| [List credit notes](/api-reference/credit-notes/list-credit-notes) | Review credit notes, optionally filtered by status. |
| [Retrieve a credit note](/api-reference/credit-notes/retrieve-a-credit-note) | Fetch one credit note. |
| [Void a credit note](/api-reference/credit-notes/void-a-credit-note) | Reverse an issued credit note. |
| [Download a credit note as PDF](/api-reference/credit-notes/download-a-credit-note-as-pdf) | Render the credit note as an inline PDF. |

## Statuses

| Status | Meaning |
| - | - |
| `issued` | The normal state after creation. |
| `void` | The credit note has been reversed. Voiding stamps `voided_at`. |

## Notes

* Creating a credit note against a draft, open, void, or uncollectible invoice returns `422`.
* Supply either `lines` or `amount` on create. Supplying both returns `400`.
* The `reason` field accepts `duplicate`, `fraudulent`, `order_change`, `product_unsatisfactory`, or `adjustment`.
* Voiding a credit note that is already `void` returns `422`.
* Send an `Idempotency-Key` header on create and void so a retried request does not issue a duplicate credit or reject a second void. See [Idempotency](/api-reference/idempotency).


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