# List credit notes

Return a list of credit notes.

Endpoint: GET /credit-notes
Version: partners-v1
Security: bearerAuth, basicAuth

## Query parameters:

  - `limit` (integer)
    Limit the number of credit notes returned.

  - `page` (string)
    Specify the page of credit notes returned.

  - `filter` (object)
    Filter credit notes by the specified fields.

Filter semantics: `filter[field][operator]=value`.

Available filter operators:
- `eq` - equal (=)
- `gt` - greater than (>)
- `gte` - greater than or equal (>=)
- `lt` - less than (<)
- `lte` - less than or equal  (<=)

Filtering is allowed by the following fields:
  - `merchant_id` (`eq`) - filter by sub-merchant ID
  - `number` (`eq`)
  - `customer_id` (`eq`)
  - `invoice_id` (`eq`)
  - `payment_id` (`eq`)
  - `amount` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_balance` (`eq`, `gt`, `lt`, `gte`, `lte`)
  - `amount_paid` (`eq`, `gt`, `lt`, `gte`, `lte`)

Example: `filter[number][eq]=CN-001`

Note: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`

  - `sort` (string)
    Sort credit notes by the specified field. Use `-` prefix for descending order.

Available sort fields:
  - `id`
  - `created_at`
  - `amount`
  - `amount_balance`

Example: `sort=-created_at` (sort by created_at in descending order)

## Response 200 fields (application/json):

  - `count` (integer)
    Example: 1

  - `limit` (integer)
    Example: 25

  - `page` (integer)
    Example: 1

  - `results` (array)

  - `results.id` (string)
    Unique identifier for the credit note.
    Example: CNMlaE5wbg0

  - `results.source` (string)
    Source of the credit note creation.
    Enum: "MERCHANT_USER", "ADMIN_USER", "API"

  - `results.customer_id` (string)
    ID of the customer associated with the credit note.
    Example: X50sgfRd

  - `results.merchant_id` (string)
    ID of the sub-merchant this credit note belongs to.
    Example: MER456789

  - `results.invoice_id` (string)
    ID of the invoice this credit note is associated with.
    Example: PMMlaE5wbg0

  - `results.created_by_user_id` (string)
    ID of the user who created the credit note.
    Example: USR123456

  - `results.number` (string)
    Credit note number identifier.
    Example: CN-001

  - `results.amount` (number)
    Total amount of the credit note.
    Example: 1000

  - `results.amount_balance` (number)
    Remaining balance to be applied.
    Example: 500

  - `results.amount_paid` (number)
    Amount that has been applied/paid out.
    Example: 500

  - `results.amount_voided` (number)
    Amount that has been voided.
    Example: 0

  - `results.amount_payout` (number)
    Total payout amount for the credit note.
    Example: 1000

  - `results.amount_payout_balance` (number)
    Remaining payout balance.
    Example: 500

  - `results.amount_payout_paid` (number)
    Amount that has been paid out.
    Example: 500

  - `results.credit_note_url` (string)
    The credit note PDF that you've uploaded to Resolve.
    Example: https://www.example.com/credit-note.pdf

  - `results.resolve_credit_note_url` (string)
    Resolve-issued credit note PDF.
    Example: https://www.example.com/resolve-credit-note.pdf

  - `results.reason_code` (string)
    The reason code for issuing this credit note.
    Enum: "chargeback", "duplicate", "fraudulent", "requested_by_customer", "missing_remittance", "overpayment_on_invoice", "invoice_was_refunded", "double_payment_on_invoice", "missing_invoice_in_resolve", "credit_transfer", "other"

  - `results.reason_message` (string)
    Additional details explaining the reason for the credit note.
    Example: Customer returned damaged goods

  - `results.voided` (boolean)
    Indicates whether the credit note is voided.
    Example: false

  - `results.voided_at` (string)
    Date the credit note was voided.
    Example: null

## Response 400 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Validation error

  - `error.type` (string)
    A short string, describing error type
    Enum: "validation_error"

  - `error.details` (array)

  - `error.details.path` (string)
    Path to the field failed validation
    Example: path.to.field

  - `error.details.message` (string)
    Detailed description of the error
    Example: `[field]` is required

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 429 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Too many requests

  - `error.type` (string)
    A short string, describing error type
    Enum: "rate_limit_error"

