Skip to content

Ledger tools

MCP tools for Ledger: ledger_accounts_get, ledger_accounts_list, ledger_adjustments_create, ledger_transactions_get, ledger_transactions_list, ledger_trial_balance.

  • ledger_accounts_get: Get a ledger account
  • ledger_accounts_list: List ledger accounts
  • ledger_adjustments_create: Create a manual ledger adjustment
  • ledger_transactions_get: Get a ledger transaction
  • ledger_transactions_list: List ledger transactions
  • ledger_trial_balance: Get the trial balance

ledger_accounts_get

Get a ledger account. Operation ledger.accounts.get · Legal entity level · permission ledger:read · risk tier read · since M2

Returns one account of the legal entity's ledger by its ID (acct_…): code, type, normal side, currency and balance (integer micros, signed in the account's normal direction), plus its newest transactions (recentTransactions, up to 10). For the full statement, list transactions with accountId (recentTransactions.url). An account of another entity or mode is resource_not_found.

Annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
idID (acct_…)yes–
entity_idID (ent_…)noThe legal entity to act on (ent_…), inside your API key's reach. Needed with an organization key; entity and brand keys act on their own entity.
  • Legal entity: pass entity_id with an organization key; entity and brand keys act on their own entity.
  • Read-only: changes nothing; idempotency_key is ignored.

Errors

  • resource_not_found: No account with this ID is in this entity's ledger in this mode.
  • scope_required: The request names no legal entity (an org key without Ownrecord-Entity).
  • permission_denied: You can't see this entity's ledger (brand-scoped members never can).

Example

The entity's EUR bank account

Arguments:

JSON
{
  "id": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "id": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
  "object": "ledger_account",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "brandId": null,
  "code": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
  "kind": "bank",
  "type": "asset",
  "currency": "EUR",
  "normalSide": "debit",
  "noNegative": false,
  "balance": {
    "posted": "1500000000",
    "pending": "0"
  },
  "createdAt": "2026-10-13T12:00:00.000Z",
  "updatedAt": "2026-10-14T09:30:00.000Z",
  "recentTransactions": {
    "object": "list",
    "data": [
      {
        "id": "txn_01m4tx5nj8emwbyf7y9vcf47xg",
        "object": "ledger_transaction",
        "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
        "livemode": true,
        "brandId": null,
        "kind": "adjustment",
        "status": "posted",
        "entries": [
          {
            "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
            "accountCode": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
            "side": "debit",
            "amount": "1500000000",
            "currency": "EUR"
          },
          {
            "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
            "accountCode": "opening_balances:EUR",
            "side": "credit",
            "amount": "1500000000",
            "currency": "EUR"
          }
        ],
        "totals": [
          {
            "currency": "EUR",
            "debits": "1500000000",
            "credits": "1500000000"
          }
        ],
        "effectiveAt": "2026-10-14T09:30:00.000Z",
        "postedAt": "2026-10-14T09:30:00.000Z",
        "voidedAt": null,
        "reversalOf": null,
        "links": {},
        "memo": "Opening bank balance from the 2026-09-30 statement",
        "actor": {
          "type": "user",
          "id": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
          "via": "console",
          "approvalId": "apr_01m4tx5nj8emwbyf7y9vcf47xj",
          "onBehalfOfUserId": null,
          "clientId": null,
          "supportGrantId": null
        },
        "createdAt": "2026-10-14T09:30:00.000Z"
      }
    ],
    "has_more": false,
    "url": "/api/v1/ledger/transactions?accountId=acct_01m4tx5nj8emwbyf7y9vcf47xc"
  }
}

ledger_accounts_list

List ledger accounts. Operation ledger.accounts.list · Legal entity level · permission ledger:read · risk tier read · since M2

Lists the accounts of the legal entity's ledger in the mode of the request, newest first: the account explorer. One ledger serves all brands of the entity (spec §11.2); accounts are opened the first time a posting uses them, one per account code and currency.

Each account shows its balance in integer micros, signed in the account's normal direction: a positive balance is on the normalSide (debit for assets and expenses, credit for liabilities, revenue and equity), a negative one on the other side. posted counts posted entries; pending counts entries of pending transactions.

Filter by brandId (a brand's revenue, deferred revenue and receivables accounts and its customers' accounts; none for the entity-wide accounts), currency and type. Paginate with limit (1–100, default 10) and starting_after (the next_cursor of the previous page).

Annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
brandIdID (brd_…) or nonenoA brand's accounts (brd_…), or none for the entity-wide accounts.
currencystringnoAccounts in this currency.
typeone of asset, liability, revenue, expense, equitynoAccounts of this type.
limitintegernoPage size, 1 to 100 (default 10). (1–100)
starting_afterID (acct_…)noThe next_cursor of the previous page.
entity_idID (ent_…)noThe legal entity to act on (ent_…), inside your API key's reach. Needed with an organization key; entity and brand keys act on their own entity.
  • Legal entity: pass entity_id with an organization key; entity and brand keys act on their own entity.
  • Read-only: changes nothing; idempotency_key is ignored.

Errors

Examples

The entity's EUR accounts

Arguments:

JSON
{
  "currency": "EUR",
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "object": "list",
  "data": [
    {
      "id": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
      "object": "ledger_account",
      "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
      "livemode": true,
      "brandId": null,
      "code": "opening_balances:EUR",
      "kind": "opening_balances",
      "type": "equity",
      "currency": "EUR",
      "normalSide": "credit",
      "noNegative": false,
      "balance": {
        "posted": "1500000000",
        "pending": "0"
      },
      "createdAt": "2026-10-13T12:00:00.000Z",
      "updatedAt": "2026-10-14T09:30:00.000Z"
    },
    {
      "id": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
      "object": "ledger_account",
      "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
      "livemode": true,
      "brandId": null,
      "code": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
      "kind": "bank",
      "type": "asset",
      "currency": "EUR",
      "normalSide": "debit",
      "noNegative": false,
      "balance": {
        "posted": "1500000000",
        "pending": "0"
      },
      "createdAt": "2026-10-13T12:00:00.000Z",
      "updatedAt": "2026-10-14T09:30:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Entity-wide equity accounts, one per page

Arguments:

JSON
{
  "brandId": "none",
  "type": "equity",
  "limit": 1,
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "object": "list",
  "data": [
    {
      "id": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
      "object": "ledger_account",
      "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
      "livemode": true,
      "brandId": null,
      "code": "opening_balances:EUR",
      "kind": "opening_balances",
      "type": "equity",
      "currency": "EUR",
      "normalSide": "credit",
      "noNegative": false,
      "balance": {
        "posted": "1500000000",
        "pending": "0"
      },
      "createdAt": "2026-10-13T12:00:00.000Z",
      "updatedAt": "2026-10-14T09:30:00.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "acct_01m4tx5nj8emwbyf7y9vcf47xd"
}

ledger_adjustments_create

Create a manual ledger adjustment. Operation ledger.adjustments.create · Legal entity level · permission ledger:adjust · risk tier financial · since M2

Posts a manual adjustment to the legal entity's ledger: a transaction of kind adjustment that corrects balances, e.g. to record an opening bank balance. Posted transactions are never changed; to undo an adjustment, post the reverse one.

Send either two accounts and an amount (debitAccount, creditAccount, amount as { "amount": "<integer micros>", "currency": "EUR" }), or entries (2–50, each { account, side, amount, currency }) that balance in every currency. Every adjustment needs a memo: the reason, shown in the ledger, the audit log and to approvers.

  • Customer wallet accounts can't be adjusted (credit grants move them).
  • Accounts are codes from the chart of accounts, in the entry's currency. An adjustment may open entity-wide, bank (this entity's) and brand accounts (of this entity's brands); accounts that name a processor connection, product or customer must already exist.
  • brandId makes the transaction the brand's (default: the one brand whose accounts it moves).

Financial tier: the finance role (or an owner or admin) with a sign-in in the last 15 minutes. If the organization's approval policy lists this operation, a call above the limit of its currency (or in several currencies) answers approval_required: it runs once a second person approves it, as you sent it. Dry-run it first (Ownrecord-Dry-Run: true, dry_run: true) to see the entries it would post.

Annotations: readOnlyHint: false · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
debitAccountstringnoTwo-account form: the account code to debit, e.g. bank:ent_…:EUR. (1–200 characters)
creditAccountstringnoTwo-account form: the account code to credit, e.g. opening_balances:EUR. (1–200 characters)
amountobjectnoTwo-account form: the amount, integer micros as a string, and its currency.
entriesarray of objectnoEntries form: 2 to 50 entries that balance in every currency. (2–50 items)
brandIdID (brd_…)noThe brand the adjustment belongs to. Default: the one brand whose accounts it moves.
memostringyesThe reason: shown in the ledger, the audit log and to approvers. (1–500 characters)
entity_idID (ent_…)noThe legal entity to act on (ent_…), inside your API key's reach. Needed with an organization key; entity and brand keys act on their own entity.
idempotency_keystringnoA unique string for this change. Retrying with the same key and arguments never acts twice. When left out, the server generates one and returns it in the result's idempotency_key. (1–255 characters)
dry_runbooleannotrue: check permissions and rules and compute the result, then roll everything back. Nothing is saved. (default false)
  • Legal entity: pass entity_id with an organization key; entity and brand keys act on their own entity.
  • Idempotency: the result returns the idempotency_key used, yours or one the server generated. Retry with it: a call with the same key and arguments never acts twice (keys are kept for 24 hours).
  • Dry run: supported. dry_run: true checks permissions and rules and computes the result, then rolls everything back.

Errors

Examples

Record an opening bank balance

Two accounts and an amount: debit the bank account, credit opening balances.

Arguments:

JSON
{
  "debitAccount": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
  "creditAccount": "opening_balances:EUR",
  "amount": {
    "amount": "1500000000",
    "currency": "EUR"
  },
  "memo": "Opening bank balance from the 2026-09-30 statement",
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy",
  "idempotency_key": "8d0c5f8e-4b7a-4e43-9b0f-2f6a0c1d9e21"
}

Result output:

JSON
{
  "id": "txn_01m4tx5nj8emwbyf7y9vcf47xg",
  "object": "ledger_transaction",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "brandId": null,
  "kind": "adjustment",
  "status": "posted",
  "entries": [
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
      "accountCode": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
      "side": "debit",
      "amount": "1500000000",
      "currency": "EUR"
    },
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
      "accountCode": "opening_balances:EUR",
      "side": "credit",
      "amount": "1500000000",
      "currency": "EUR"
    }
  ],
  "totals": [
    {
      "currency": "EUR",
      "debits": "1500000000",
      "credits": "1500000000"
    }
  ],
  "effectiveAt": "2026-10-14T09:30:00.000Z",
  "postedAt": "2026-10-14T09:30:00.000Z",
  "voidedAt": null,
  "reversalOf": null,
  "links": {},
  "memo": "Opening bank balance from the 2026-09-30 statement",
  "actor": {
    "type": "user",
    "id": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
    "via": "console",
    "approvalId": "apr_01m4tx5nj8emwbyf7y9vcf47xj",
    "onBehalfOfUserId": null,
    "clientId": null,
    "supportGrantId": null
  },
  "createdAt": "2026-10-14T09:30:00.000Z"
}

Move usage revenue of one brand, with entries

Arguments:

JSON
{
  "entries": [
    {
      "account": "revenue:brd_01m4tx5nj8emwbyf7y9vcf47x4:usage:api.calls:EUR",
      "side": "debit",
      "amount": "2500000",
      "currency": "EUR"
    },
    {
      "account": "rounding:EUR",
      "side": "credit",
      "amount": "2500000",
      "currency": "EUR"
    }
  ],
  "memo": "Reclassify a rounding difference booked as usage revenue",
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy",
  "idempotency_key": "8d0c5f8e-4b7a-4e43-9b0f-2f6a0c1d9e21"
}

Result output:

JSON
{
  "id": "txn_01m4tx5nj8emwbyf7y9vcf47xh",
  "object": "ledger_transaction",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "brandId": "brd_01m4tx5nj8emwbyf7y9vcf47x4",
  "kind": "adjustment",
  "status": "posted",
  "entries": [
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xe",
      "accountCode": "revenue:brd_01m4tx5nj8emwbyf7y9vcf47x4:usage:api.calls:EUR",
      "side": "debit",
      "amount": "2500000",
      "currency": "EUR"
    },
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xf",
      "accountCode": "rounding:EUR",
      "side": "credit",
      "amount": "2500000",
      "currency": "EUR"
    }
  ],
  "totals": [
    {
      "currency": "EUR",
      "debits": "2500000",
      "credits": "2500000"
    }
  ],
  "effectiveAt": "2026-10-14T09:30:00.000Z",
  "postedAt": "2026-10-14T09:30:00.000Z",
  "voidedAt": null,
  "reversalOf": null,
  "links": {},
  "memo": "Reclassify a rounding difference booked as usage revenue",
  "actor": {
    "type": "user",
    "id": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
    "via": "api",
    "approvalId": null,
    "onBehalfOfUserId": null,
    "clientId": null,
    "supportGrantId": null
  },
  "createdAt": "2026-10-14T09:30:00.000Z"
}

ledger_transactions_get

Get a ledger transaction. Operation ledger.transactions.get · Legal entity level · permission ledger:read · risk tier read · since M2

Returns one transaction of the legal entity's ledger by its ID (txn_…): its kind and status, the debit and credit entries with their account codes (integer micros), the totals per currency, the business date (effectiveAt), the objects it is about (links), the memo, and the actor who posted it (actor.approvalId names the approval request when a second person approved it). A transaction of another entity or mode is resource_not_found.

Annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
idID (txn_…)yes–
entity_idID (ent_…)noThe legal entity to act on (ent_…), inside your API key's reach. Needed with an organization key; entity and brand keys act on their own entity.
  • Legal entity: pass entity_id with an organization key; entity and brand keys act on their own entity.
  • Read-only: changes nothing; idempotency_key is ignored.

Errors

  • resource_not_found: No transaction with this ID is in this entity's ledger in this mode.
  • scope_required: The request names no legal entity (an org key without Ownrecord-Entity).
  • permission_denied: You can't see this entity's ledger (brand-scoped members never can).

Example

An approved manual adjustment

Arguments:

JSON
{
  "id": "txn_01m4tx5nj8emwbyf7y9vcf47xg",
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "id": "txn_01m4tx5nj8emwbyf7y9vcf47xg",
  "object": "ledger_transaction",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "brandId": null,
  "kind": "adjustment",
  "status": "posted",
  "entries": [
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
      "accountCode": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
      "side": "debit",
      "amount": "1500000000",
      "currency": "EUR"
    },
    {
      "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
      "accountCode": "opening_balances:EUR",
      "side": "credit",
      "amount": "1500000000",
      "currency": "EUR"
    }
  ],
  "totals": [
    {
      "currency": "EUR",
      "debits": "1500000000",
      "credits": "1500000000"
    }
  ],
  "effectiveAt": "2026-10-14T09:30:00.000Z",
  "postedAt": "2026-10-14T09:30:00.000Z",
  "voidedAt": null,
  "reversalOf": null,
  "links": {},
  "memo": "Opening bank balance from the 2026-09-30 statement",
  "actor": {
    "type": "user",
    "id": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
    "via": "console",
    "approvalId": "apr_01m4tx5nj8emwbyf7y9vcf47xj",
    "onBehalfOfUserId": null,
    "clientId": null,
    "supportGrantId": null
  },
  "createdAt": "2026-10-14T09:30:00.000Z"
}

ledger_transactions_list

List ledger transactions. Operation ledger.transactions.list · Legal entity level · permission ledger:read · risk tier read · since M2

Lists the transactions of the legal entity's ledger in the mode of the request, newest first. Every transaction has balanced debit and credit entries (integer micros) on the entity's accounts, its kind and status, the actor who posted it (with approvalId when a second person approved it) and the objects it is about (links). Posted transactions are never changed: corrections are reversals (reversalOf).

Filters: accountId (an account statement), kind (one or several), status, brandId (or none), and effectiveFrom / effectiveTo, whole days in UTC (YYYY-MM-DD, both included). Paginate with limit (1–100, default 10) and starting_after (the next_cursor of the previous page). With a date filter, one call reads at most 1,000 transactions, so a page can hold fewer than limit items while has_more is true: keep paging with next_cursor.

Annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
accountIdID (acct_…)noTransactions with an entry on this account: its statement.
kindone of 19 values, e.g. topup, sale, grant or array of one of 19 values, e.g. topup, sale, grantnoOne kind, or several.
statusone of pending, posted, voidednopending, posted or voided.
brandIdID (brd_…) or nonenoA brand's transactions (brd_…), or none for those of no brand.
effectiveFromstringnoEffective on or after this day (YYYY-MM-DD, UTC).
effectiveTostringnoEffective on or before this day (YYYY-MM-DD, UTC).
limitintegernoPage size, 1 to 100 (default 10). (1–100)
starting_afterID (txn_…)noThe next_cursor of the previous page.
entity_idID (ent_…)noThe legal entity to act on (ent_…), inside your API key's reach. Needed with an organization key; entity and brand keys act on their own entity.
  • Legal entity: pass entity_id with an organization key; entity and brand keys act on their own entity.
  • Read-only: changes nothing; idempotency_key is ignored.

Errors

  • validation_failed: A filter or pagination value is invalid, or effectiveFrom is after effectiveTo.
  • scope_required: The request names no legal entity (an org key without Ownrecord-Entity).
  • permission_denied: You can't see this entity's ledger (brand-scoped members never can).

Examples

Manual adjustments in October 2026

Arguments:

JSON
{
  "kind": "adjustment",
  "effectiveFrom": "2026-10-01",
  "effectiveTo": "2026-10-31",
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "object": "list",
  "data": [
    {
      "id": "txn_01m4tx5nj8emwbyf7y9vcf47xg",
      "object": "ledger_transaction",
      "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
      "livemode": true,
      "brandId": null,
      "kind": "adjustment",
      "status": "posted",
      "entries": [
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
          "accountCode": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
          "side": "debit",
          "amount": "1500000000",
          "currency": "EUR"
        },
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
          "accountCode": "opening_balances:EUR",
          "side": "credit",
          "amount": "1500000000",
          "currency": "EUR"
        }
      ],
      "totals": [
        {
          "currency": "EUR",
          "debits": "1500000000",
          "credits": "1500000000"
        }
      ],
      "effectiveAt": "2026-10-14T09:30:00.000Z",
      "postedAt": "2026-10-14T09:30:00.000Z",
      "voidedAt": null,
      "reversalOf": null,
      "links": {},
      "memo": "Opening bank balance from the 2026-09-30 statement",
      "actor": {
        "type": "user",
        "id": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
        "via": "console",
        "approvalId": "apr_01m4tx5nj8emwbyf7y9vcf47xj",
        "onBehalfOfUserId": null,
        "clientId": null,
        "supportGrantId": null
      },
      "createdAt": "2026-10-14T09:30:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

The statement of one account, one per page

Arguments:

JSON
{
  "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
  "limit": 1,
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "object": "list",
  "data": [
    {
      "id": "txn_01m4tx5nj8emwbyf7y9vcf47xg",
      "object": "ledger_transaction",
      "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
      "livemode": true,
      "brandId": null,
      "kind": "adjustment",
      "status": "posted",
      "entries": [
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
          "accountCode": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
          "side": "debit",
          "amount": "1500000000",
          "currency": "EUR"
        },
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
          "accountCode": "opening_balances:EUR",
          "side": "credit",
          "amount": "1500000000",
          "currency": "EUR"
        }
      ],
      "totals": [
        {
          "currency": "EUR",
          "debits": "1500000000",
          "credits": "1500000000"
        }
      ],
      "effectiveAt": "2026-10-14T09:30:00.000Z",
      "postedAt": "2026-10-14T09:30:00.000Z",
      "voidedAt": null,
      "reversalOf": null,
      "links": {},
      "memo": "Opening bank balance from the 2026-09-30 statement",
      "actor": {
        "type": "user",
        "id": "usr_01m4tx5nj8emwbyf7y9vcf47xa",
        "via": "console",
        "approvalId": "apr_01m4tx5nj8emwbyf7y9vcf47xj",
        "onBehalfOfUserId": null,
        "clientId": null,
        "supportGrantId": null
      },
      "createdAt": "2026-10-14T09:30:00.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "txn_01m4tx5nj8emwbyf7y9vcf47xg"
}

ledger_trial_balance

Get the trial balance. Operation ledger.trial_balance · Legal entity level · permission ledger:read · risk tier read · since M2

Returns the trial balance of the legal entity's ledger in the mode of the request: for each currency, every account with a non-zero posted balance, its balance on the debit or the credit side (integer micros), and the debit and credit totals. The totals of a currency must be equal (balanced); difference is debits minus credits. All brands of the entity are included.

Without asOf, the balances are the accounts' current posted balances. With asOf (YYYY-MM-DD), they are recomputed from the posted transactions effective up to the end of that day (UTC). Pending and voided transactions never count. Filter with currency.

Annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false

Arguments

ArgumentTypeRequiredDescription
asOfstringnoBalances at the end of this day (YYYY-MM-DD, UTC). Leave it out for the balances now.
currencystringnoOne currency only.
entity_idID (ent_…)noThe legal entity to act on (ent_…), inside your API key's reach. Needed with an organization key; entity and brand keys act on their own entity.
  • Legal entity: pass entity_id with an organization key; entity and brand keys act on their own entity.
  • Read-only: changes nothing; idempotency_key is ignored.

Errors

  • validation_failed: asOf isn't a date such as 2026-09-30, or currency isn't a currency code.
  • scope_required: The request names no legal entity (an org key without Ownrecord-Entity).
  • permission_denied: You can't see this entity's ledger (brand-scoped members never can).

Examples

The trial balance now

Arguments:

JSON
{
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "object": "ledger_trial_balance",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "asOf": null,
  "balanced": true,
  "currencies": [
    {
      "currency": "EUR",
      "accounts": [
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
          "code": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
          "type": "asset",
          "normalSide": "debit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "1500000000",
          "credit": "0"
        },
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
          "code": "opening_balances:EUR",
          "type": "equity",
          "normalSide": "credit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "0",
          "credit": "1500000000"
        }
      ],
      "totals": {
        "debit": "1500000000",
        "credit": "1500000000"
      },
      "difference": "0",
      "balanced": true
    }
  ]
}

EUR balances at the end of September 2026

Arguments:

JSON
{
  "asOf": "2026-09-30",
  "currency": "EUR",
  "entity_id": "ent_01jbx4m3v8e9t0s6k2c5n7q1wy"
}

Result output:

JSON
{
  "object": "ledger_trial_balance",
  "entityId": "ent_01m4tx5nj8emwbyf7y9vcf47x2",
  "livemode": true,
  "asOf": "2026-09-30",
  "balanced": true,
  "currencies": [
    {
      "currency": "EUR",
      "accounts": [
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xc",
          "code": "bank:ent_01m4tx5nj8emwbyf7y9vcf47x2:EUR",
          "type": "asset",
          "normalSide": "debit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "1500000000",
          "credit": "0"
        },
        {
          "accountId": "acct_01m4tx5nj8emwbyf7y9vcf47xd",
          "code": "opening_balances:EUR",
          "type": "equity",
          "normalSide": "credit",
          "brandId": null,
          "balance": "1500000000",
          "debit": "0",
          "credit": "1500000000"
        }
      ],
      "totals": {
        "debit": "1500000000",
        "credit": "1500000000"
      },
      "difference": "0",
      "balanced": true
    }
  ]
}