Ledger Accounts

A ledger_account is an account in a double-entry accounting system. Common examples include asset, liability, expense, and revenue accounts. Each ledger account belongs to a ledger and can only have entries with other accounts belonging to the same ledger.

Attribute

Description

id
string

Unique identifier for the ledger account.

name
string

The name of the ledger account. e.g. Assets

description
string

An optional free-form description for internal use.

normal_balance
string

One of credit, debit

If an account is credit normal, then a "negative" balance would be one where the debit balance exceeds the credit balance. For example, liabilities accounts are credit normal whereas assets accounts are debit normal.

balances
object

The pending, posted, and available balances for this ledger account. The posted balance is the sum of all posted entries on the account. The pending balance is the sum of all pending and posted entries on the account. The available balance is the posted incoming entries minus the sum of the pending and posted outgoing amounts. See the
Transaction Status and Balances guide for more information.

ledger_id
string

The ID of the ledger this account belongs to.

metadata
object

Additional data represented as key-value pairs. Both the key and value must be strings. See Metadata.

live_mode
boolean

This field will be true if this object was created with a production API key or false if created with a test API key.

lock_version
int32

This field is incremented when the pending or posted balance of the ledger account changes. Can be referenced when creating a ledger transaction to prevent the transaction from being created if the lock version has changed.

{
    "id": "f1c7e474-e6d5-4741-9f76-04510c8b6d7a",
    "object": "ledger_account",
    "name": "Liabilities",
    "ledger_id": "a9d970da-207e-43da-b4d6-6e9ae01ba2cc",
    "description": null,
    "lock_version": 6,
    "normal_balance": "credit",
    "balances": {
      "pending_balance": {
        "credits": 50000,
        "debits": 10000,
        "amount": 40000,
        "currency": "USD",
        "currency_exponent": 2
      },
      "posted_balance": {
        "credits": 20000,
        "debits": 1000,
        "amount": 19000,
        "currency": "USD",
        "currency_exponent": 2
      },
      "available_balance": {
        "credits": 20000,
        "debits": 10000,
        "amount": 10000,
        "currency": "USD",
        "currency_exponent": 2
      } 
    },
    "metadata": {},
    "live_mode": true,
    "created_at": "2020-08-04T16:54:32Z",
    "updated_at": "2020-08-04T16:54:32Z"
}