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

# Credit Note Journal Entries

> Every ledger posting that references a credit note — its Customer-Credit liability leg, any tax reversal, and refund or write-off legs — each with its debit and credit account.

Returns every ledger posting that references this credit note: its
Customer-Credit liability leg, any tax reversal, and refund or write-off legs.
Each entry is one balanced transfer — a debit account and a credit account
(id, code, and name), an amount in minor units, its posting code, and a
timestamp. This is the finance-accounting side of the credit-note page, and the
same shape as [Invoice Journal Entries](/api-reference/invoices/journal-entries).

Account ids deep-link each leg to its ledger account; `transaction_id` links
to the [journal entry](/api-reference/ledger/transaction) itself. See
[Explain any number](/advanced/explain-any-number) for the wider picture.

## Example Request

```bash theme={null}
curl "https://api.recurso.dev/v1/credit-notes/8d1f3a6b-2c4e-4f70-9a1b-5c6d7e8f9a0b/journal-entries" \
  -H "Authorization: Bearer $API_KEY"
```

## Example Response

```json theme={null}
{
  "data": {
    "credit_note_id": "8d1f3a6b-2c4e-4f70-9a1b-5c6d7e8f9a0b",
    "entries": [
      {
        "transaction_id": "5f8c2b96-1d4e-4a7c-9b3f-6e0a8d2c4f17",
        "timestamp": "2026-08-01T09:00:00Z",
        "code": 8,
        "debit_account_id": "f6a4b0c3-8d5e-4ebf-a091-4c7d1e5f3a68",
        "debit_account_code": 5100,
        "debit_account_name": "Credits & Adjustments",
        "credit_account_id": "a7b5c1d4-9e6f-4fc0-b1a2-5d8e2f6a4b79",
        "credit_account_code": 2300,
        "credit_account_name": "Customer Credit",
        "amount": 5000,
        "reference_id": "8d1f3a6b-2c4e-4f70-9a1b-5c6d7e8f9a0b",
        "description": "Adjustment credit issued",
        "accounting_version": 1
      },
      {
        "transaction_id": "7d2b9f41-8c3e-4a5d-b6f0-1e4a7c9d2b58",
        "timestamp": "2026-08-15T00:10:00Z",
        "code": 7,
        "debit_account_id": "a7b5c1d4-9e6f-4fc0-b1a2-5d8e2f6a4b79",
        "debit_account_code": 2300,
        "debit_account_name": "Customer Credit",
        "credit_account_id": "b3a1c9e7-2f4d-4a8b-9c6e-1d5f7a2b8c30",
        "credit_account_code": 1100,
        "credit_account_name": "Accounts Receivable",
        "amount": 500,
        "reference_id": "8d1f3a6b-2c4e-4f70-9a1b-5c6d7e8f9a0b",
        "description": "Credit applied to invoice",
        "accounting_version": 1
      }
    ]
  }
}
```

## Entry Fields

| Field                                                               | Type                    | Description                                                                                   |
| ------------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------- |
| `transaction_id`                                                    | string (uuid)           | The posted transaction — fetch it with [Get Journal Entry](/api-reference/ledger/transaction) |
| `timestamp`                                                         | string (date-time)      | When the leg was posted                                                                       |
| `code`                                                              | integer                 | Posting code — see [posting codes](/advanced/ledger#how-transactions-are-created)             |
| `debit_account_id` / `debit_account_code` / `debit_account_name`    | uuid / integer / string | The debit side of the transfer; the id deep-links to the ledger account                       |
| `credit_account_id` / `credit_account_code` / `credit_account_name` | uuid / integer / string | The credit side of the transfer                                                               |
| `amount`                                                            | integer (int64)         | Minor units                                                                                   |
| `reference_id`                                                      | string (uuid)           | The business object that caused the posting                                                   |
| `description`                                                       | string                  | Human-readable posting description                                                            |
| `accounting_version`                                                | integer                 | Posting-semantics version the leg was written under                                           |

<Note>
  Read-only. An existing credit note with no postings yet returns an empty
  `entries` list. A missing or cross-tenant `id` returns `404`.
</Note>


## OpenAPI

````yaml GET /v1/credit-notes/{id}/journal-entries
openapi: 3.1.0
info:
  title: Recurso API
  version: 1.0.0
  description: |
    The Recurso billing engine REST API.

    Authenticate by passing your API key as a bearer token:

        Authorization: Bearer <api_key>

    Obtain an API key by registering a tenant via `POST /auth/register`.
    All authenticated endpoints live under the `/v1` prefix. Mutating
    endpoints support idempotency via the `Idempotency-Key` header.
  license:
    name: MIT
    identifier: MIT
servers:
  - url: https://billing.example.com
    description: >-
      Example deployment — substitute the base URL of your own Recurso
      deployment.
security:
  - bearerAuth: []
tags:
  - name: System
    description: Health, version, and API metadata
  - name: Auth
    description: Tenant registration
  - name: Plans
    description: Product catalog plans
  - name: Customers
    description: Customer management
  - name: Subscriptions
    description: Subscription lifecycle
  - name: Invoices
    description: Invoices, PDFs, and Indian GST e-invoicing
  - name: Coupons
    description: Discounts
  - name: Usage
    description: Metered usage events
  - name: Credit Notes
    description: Customer credits
  - name: Quotes
    description: Quote-to-invoice lifecycle
  - name: Webhooks
    description: Webhook endpoint management and event feed
  - name: Analytics
    description: Revenue analytics
  - name: Checkout
    description: Public hosted checkout for invoices
  - name: Payments
    description: Payment order creation
  - name: Inbound Webhooks
    description: Receivers for payment-gateway callbacks (Razorpay, Stripe)
  - name: Customer Portal
    description: Customer-facing portal — magic-link auth and session-scoped data
  - name: Developer
    description: API key management
  - name: Account
    description: Tenant account settings
  - name: Finance
    description: Ledger accounts, entries, reconciliation, and revenue recognition
  - name: Settings
    description: Tax (GST) and e-invoicing (IRP) configuration
  - name: Consents
    description: Consent records for RBI-compliant recurring billing
  - name: Referrals
    description: Customer referral program
  - name: Gifts
    description: Gift subscriptions
  - name: Mandates
    description: UPI Autopay mandates
  - name: Offline Payments
    description: Virtual accounts and manually recorded payments
  - name: Organizations
    description: Multi-entity organizations grouping several tenants
  - name: Accounting
    description: QuickBooks / Xero accounting integrations
  - name: Churn
    description: Churn risk scoring and alerts
  - name: Cancel Flows
    description: Configurable retention flows shown at cancellation time
  - name: Dunning
    description: Dunning analytics and multi-channel dunning campaigns
paths:
  /v1/credit-notes/{id}/journal-entries:
    get:
      tags:
        - CreditNotes
      summary: Credit note journal entries (ledger drill)
      description: >
        Every ledger posting that references this credit note — its
        Customer-Credit liability leg, any tax reversal, and refund/write-off
        legs — each as a transfer with its debit and credit account (code +
        name), amount, posting code, and timestamp. The finance-accounting side
        of the credit-note page. Read-only; an existing note with no postings
        yet returns an empty list.
      operationId: getCreditNoteJournalEntries
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The credit note's journal entries.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      credit_note_id:
                        type: string
                        format: uuid
                      entries:
                        type: array
                        items:
                          type: object
                          properties:
                            transaction_id:
                              type: string
                              format: uuid
                            timestamp:
                              type: string
                              format: date-time
                            code:
                              type: integer
                            debit_account_id:
                              type: string
                              format: uuid
                              description: >-
                                Debit account id — deep-links the leg to its
                                ledger account.
                            debit_account_code:
                              type: integer
                            debit_account_name:
                              type: string
                            credit_account_id:
                              type: string
                              format: uuid
                              description: >-
                                Credit account id — deep-links the leg to its
                                ledger account.
                            credit_account_code:
                              type: integer
                            credit_account_name:
                              type: string
                            amount:
                              type: integer
                              format: int64
                            reference_id:
                              type: string
                              format: uuid
                            description:
                              type: string
                            accounting_version:
                              type: integer
        '404':
          description: Credit note not found.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Tenant API key obtained from `POST /auth/register` or `POST
        /v1/developer/keys`.

````