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

# List all credit notes



## OpenAPI

````yaml openapi-billing.json GET /v1/credit_notes
openapi: 3.1.0
info:
  title: Yorlet Billing API
  description: APIs for managing invoices, coupons, credit grants, and subscription items.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/credit_notes:
    get:
      tags:
        - Credit Notes
      summary: List all credit notes
      operationId: credit_notes_list
      responses:
        '200':
          description: >-
            A object with a data property that contains an array of credit
            notes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: number
                    description: Total number of items in the list.
                    example: 1
                  has_more:
                    type: boolean
                    description: Whether more items are available.
                    example: false
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the object.
                        created:
                          type: number
                          description: >-
                            Time at which the object was created. Measured in
                            seconds since the Unix epoch.
                        account:
                          type: string
                          description: >-
                            The account that the object belongs to. Only
                            returned if the request is made with a valid
                            Yorlet-Context header.
                        deleted:
                          type: boolean
                          default: false
                          description: Only returned if the object has been deleted.
                        object:
                          type: string
                          enum:
                            - credit_note
                        amount:
                          type: number
                          description: The amount of the credit note.
                        credit_amount:
                          type: number
                          default: 0
                          description: >-
                            The integer amount in cents representing the amount
                            to credit the customer’s balance, which will be
                            automatically applied to their next invoice.
                        currency:
                          type: string
                          enum:
                            - gbp
                            - usd
                            - eur
                            - sek
                          description: >-
                            Three-letter ISO currency code, in lowercase. Must
                            be a supported currency.
                          example: gbp
                        customer:
                          anyOf:
                            - type: string
                            - type: object
                              additionalProperties: {}
                        description:
                          type:
                            - string
                            - 'null'
                          description: The description of the credit note.
                        discount_amount:
                          type: number
                          description: The amount of the discount for the credit note.
                        invoice:
                          anyOf:
                            - type: string
                            - type: object
                              additionalProperties: {}
                        lines:
                          type: object
                          properties:
                            count:
                              type: number
                              description: Total number of items in the list.
                              example: 1
                            has_more:
                              type: boolean
                              description: Whether more items are available.
                              example: false
                            object:
                              type: string
                              enum:
                                - list
                            data:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    description: Unique identifier for the object.
                                  created:
                                    type: number
                                    description: >-
                                      Time at which the object was created.
                                      Measured in seconds since the Unix epoch.
                                  account:
                                    type: string
                                    description: >-
                                      The account that the object belongs to.
                                      Only returned if the request is made with
                                      a valid Yorlet-Context header.
                                  deleted:
                                    type: boolean
                                    default: false
                                    description: >-
                                      Only returned if the object has been
                                      deleted.
                                  object:
                                    type: string
                                    enum:
                                      - credit_note_line_item
                                  amount:
                                    type: number
                                    description: The amount of the credit note line item.
                                  amount_excluding_tax:
                                    type: number
                                    description: >-
                                      The amount of the credit note line item
                                      excluding tax.
                                  credit_note:
                                    type:
                                      - string
                                      - 'null'
                                    pattern: ^[a-zA-Z0-9_]+$
                                    description: >-
                                      The ID of the credit note the credit note
                                      line item is for. May be null when
                                      returned from the preview endpoint, where
                                      the parent credit note has not yet been
                                      created.
                                  currency:
                                    type: string
                                    enum:
                                      - gbp
                                      - usd
                                      - eur
                                      - sek
                                    description: >-
                                      Three-letter ISO currency code, in
                                      lowercase. Must be a supported currency.
                                    example: gbp
                                  description:
                                    type: string
                                    description: >-
                                      The description of the credit note line
                                      item.
                                  invoice_item:
                                    type: string
                                    pattern: ^[a-zA-Z0-9_]+$
                                    description: >-
                                      The ID of the invoice item the credit note
                                      line item is for.
                                  pretax_credit_amounts:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        amount:
                                          type: number
                                          description: >-
                                            The amount of the pretax credit for the
                                            credit note line item.
                                        credit_grant:
                                          type: string
                                          pattern: ^[a-zA-Z0-9_]+$
                                          description: >-
                                            The ID of the credit grant the pretax
                                            credit is for.
                                        display_name:
                                          type: string
                                          description: >-
                                            The display name of the pretax credit
                                            for the credit note line item.
                                        invoice_item:
                                          type: string
                                          pattern: ^[a-zA-Z0-9_]+$
                                          description: >-
                                            The ID of the invoice item the pretax
                                            credit is for.
                                        type:
                                          type: string
                                          enum:
                                            - credit_grant
                                          description: >-
                                            The type of the pretax credit for the
                                            credit note line item.
                                      required:
                                        - amount
                                        - credit_grant
                                        - display_name
                                        - invoice_item
                                        - type
                                    description: >-
                                      The pretax credit amounts for the credit
                                      note line item.
                                  tax_amounts:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        amount:
                                          type: number
                                          description: >-
                                            The amount of the tax for the credit
                                            note line item.
                                        tax_rate:
                                          type: number
                                          description: >-
                                            The rate of the tax for the credit note
                                            line item.
                                        taxable_amount:
                                          type: number
                                          description: >-
                                            The taxable amount of the tax for the
                                            credit note line item.
                                      required:
                                        - amount
                                        - tax_rate
                                        - taxable_amount
                                    description: >-
                                      The tax amounts for the credit note line
                                      item.
                                  type:
                                    type: string
                                    enum:
                                      - invoice_item
                                    description: The type of the credit note line item.
                                required:
                                  - id
                                  - created
                                  - object
                                  - amount
                                  - amount_excluding_tax
                                  - credit_note
                                  - currency
                                  - description
                                  - invoice_item
                                  - pretax_credit_amounts
                                  - tax_amounts
                                  - type
                          required:
                            - count
                            - has_more
                            - object
                            - data
                        memo:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The credit note’s memo appears on the credit note
                            PDF.
                        metadata:
                          type:
                            - object
                            - 'null'
                          additionalProperties:
                            type: string
                          description: >-
                            Set of key-value pairs that you can attach to an
                            object. This can be useful for storing additional
                            information about the object in a structured format.
                        number:
                          type:
                            - string
                            - 'null'
                          description: The credit note number.
                        out_of_band_amount:
                          type: number
                          default: 0
                          description: The credit note amount that was paid out of band.
                        reason:
                          type: string
                          enum:
                            - duplicate
                            - fraudulent
                            - order_change
                            - product_unsatisfactory
                            - other
                          description: The reason for issuing the credit note.
                        subtotal:
                          type: number
                          default: 0
                          description: The credit note’s subtotal.
                        subtotal_excluding_tax:
                          type: number
                          default: 0
                          description: The credit note’s subtotal excluding tax.
                        status:
                          type: string
                          enum:
                            - issued
                            - void
                          description: The status of the credit note.
                        tax_amounts:
                          type: array
                          items:
                            type: object
                            properties:
                              amount:
                                type: number
                                default: 0
                                description: The amount of the tax for the credit note.
                              tax_rate:
                                type: number
                                default: 0
                                description: The rate of the tax for the credit note.
                              taxable_amount:
                                type: number
                                default: 0
                                description: >-
                                  The taxable amount of the tax for the credit
                                  note.
                          default: []
                          description: The tax amounts for the credit note.
                        tax:
                          type: number
                          default: 0
                          description: The credit note’s tax amount.
                        total:
                          type: number
                          default: 0
                          description: The credit note’s total amount.
                        total_excluding_tax:
                          type: number
                          default: 0
                          description: The credit note’s total amount excluding tax.
                        total_pretax_credit_amounts:
                          type: array
                          items:
                            type: object
                            properties:
                              amount:
                                type: number
                                default: 0
                                description: >-
                                  The amount of the pretax credit for the credit
                                  note.
                              credit_grant:
                                type: string
                                pattern: ^[a-zA-Z0-9_]+$
                                default: ''
                                description: >-
                                  The ID of the credit grant the pretax credit
                                  is for.
                              display_name:
                                type: string
                                default: ''
                                description: >-
                                  The display name of the pretax credit for the
                                  credit note.
                              invoice_item:
                                type: string
                                pattern: ^[a-zA-Z0-9_]+$
                                default: ''
                                description: >-
                                  The ID of the invoice item the pretax credit
                                  is for.
                              type:
                                type: string
                                enum:
                                  - credit_grant
                                default: credit_grant
                                description: >-
                                  The type of the pretax credit for the credit
                                  note.
                          default: []
                          description: The pretax credit amounts for the credit note.
                        type:
                          type: string
                          enum:
                            - pre_payment
                            - post_payment
                          description: The type of the credit note.
                        voided_at:
                          type:
                            - number
                            - 'null'
                          description: The date and time the credit note was voided.
                      required:
                        - id
                        - created
                        - object
                        - amount
                        - currency
                        - customer
                        - description
                        - discount_amount
                        - invoice
                        - memo
                        - number
                        - reason
                        - status
                        - type
                        - voided_at
                required:
                  - count
                  - has_more
                  - object
                  - data
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````