> ## 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.

# Get Journal Entry

> One posted transaction — a single balanced double-entry journal entry — flattened with both account ids, codes and names so each leg deep-links to its account.

Fetches one posted transaction (a single balanced double-entry journal entry)
by its `ledger_transactions` id, flattened with both account ids, codes and
names so each leg deep-links to its account page. This is the addressable
journal-entry object that a [reconciliation discrepancy's](/api-reference/finance/reconciliation-run)
`transaction_id` points to, and that every row of an
[invoice's](/api-reference/invoices/journal-entries) or
[credit note's](/api-reference/credit-notes/journal-entries) journal entries
links back to.

## Example Request

```bash theme={null}
curl "https://api.recurso.dev/v1/ledger/transactions/4c7e1a93-5b2d-4f6e-8a0c-9d3f5b7e1a24" \
  -H "Authorization: Bearer $API_KEY"
```

## Response

```json theme={null}
{
  "data": {
    "transaction_id": "4c7e1a93-5b2d-4f6e-8a0c-9d3f5b7e1a24",
    "timestamp": "2026-07-01T00:05:00Z",
    "code": 1,
    "debit_account_id": "b3a1c9e7-2f4d-4a8b-9c6e-1d5f7a2b8c30",
    "debit_account_code": 1100,
    "debit_account_name": "Accounts Receivable",
    "credit_account_id": "c4d2e8f1-6a3b-4c9d-8e7f-2a5b9c3d1e46",
    "credit_account_code": 2100,
    "credit_account_name": "Deferred Revenue",
    "amount": 118000,
    "reference_id": "06c151de-8d3a-4b21-9c77-2f0e5a9b4d12",
    "description": "Invoice issued",
    "accounting_version": 1,
    "entity_id": null,
    "entity_name": ""
  }
}
```

## Fields

| Field                                                               | Type                    | Description                                                                               |
| ------------------------------------------------------------------- | ----------------------- | ----------------------------------------------------------------------------------------- |
| `transaction_id`                                                    | string (uuid)           | The transaction's id                                                                      |
| `timestamp`                                                         | string (date-time)      | When it 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; the id deep-links to the account                                          |
| `credit_account_id` / `credit_account_code` / `credit_account_name` | uuid / integer / string | The credit side                                                                           |
| `amount`                                                            | integer (int64)         | Minor units                                                                               |
| `reference_id`                                                      | string (uuid)           | The business object that caused the posting (invoice, credit note, wallet transaction, …) |
| `description`                                                       | string                  | Human-readable posting description                                                        |
| `accounting_version`                                                | integer                 | Posting-semantics version the leg was written under                                       |
| `entity_id`                                                         | string (uuid), nullable | The legal entity whose ledger holds the entry; `null` for the primary ledger              |
| `entity_name`                                                       | string                  | The entity's name (empty for the primary ledger)                                          |

<Note>
  Read-only. A missing or cross-tenant `id` returns `404`. To list postings by
  account rather than fetch one by id, use
  [List Ledger Entries](/api-reference/ledger/entries).
</Note>


## OpenAPI

````yaml GET /v1/ledger/transactions/{id}
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/ledger/transactions/{id}:
    get:
      tags:
        - Finance
      summary: Get a single journal entry (posted transaction) by id
      description: >
        One posted transaction (a single balanced double-entry journal entry) by
        its ledger_transactions id, flattened with both account ids, codes and
        names so each leg deep-links to its account page. The addressable
        journal-entry object a reconciliation discrepancy's transaction points
        to. Read-only; cross-tenant ids return 404.
      operationId: getLedgerTransaction
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The journal entry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    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
                      debit_account_code:
                        type: integer
                      debit_account_name:
                        type: string
                      credit_account_id:
                        type: string
                        format: uuid
                      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
                      entity_id:
                        type: string
                        format: uuid
                        nullable: true
                      entity_name:
                        type: string
        '404':
          description: Transaction 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`.

````