Ledger Balances

Objects such as Ledger Accounts and Ledger Account Categories have Ledger Balances objects. Balances are returned in the balances hash object, where the keys denote the balance type. See the sample Balance Object JSON below.

Types of Balances

Balance TypeKeyDescription
Pendingpending_balanceThe sum of all pending AND posted entry amounts.
Postedposted_balanceThe sum of all posted entry amounts.
Availableavailable_balanceThe sum of all posted inbound entries and pending outbound entries, where direction is determined by the normality of the object holding the balance. See below for more details.

Pending Balance

👍

Pending balances include both posted and pending amounts.

Note that pending balances include both pending and posted amounts. To calculate the total of only pending transactions, you subtract the posted balance from the pending balance.

Balance Keypending_balance

AttributeDescription
credits
int
Summed amounts of all posted and pending ledger entries with credit direction.
debits
int
Summed amounts of all posted and pending ledger entries with debit direction.
amount
int
Credit Normal: pending_balance["credits"] - pending_balance["debits"]
Debit Normal: pending_balance["debits"] - pending_balance["credits"]
currency
string
The currency of this ledger object.
currency_exponent
int
The currency exponent of this ledger object.

Posted Balance

Balance Keyposted_balance
AttributeDescription
credits
int
Sum amounts of all posted ledger entries with credit direction.
debits
int
Sum amounts of all posted ledger entries with debit direction.
amount
int
Credit Normal: posted_balance["credits"] - posted_balance["debits"]
Debit Normal: posted_balance["debits"] - posted_balance["credits"]
currency
string
The currency of this ledger object.
currency_exponent
int
The currency exponent of this ledger object.

Available Balance

Balance Keyavailable_balance
AttributeDescription
credits
int
posted_balance["credits"]
debits
int
pending_balance["debits"]
amount
int
Credit Normal: posted_balance["credits"] - pending_balance["debits"]
Debit Normal: posted_balance["debits"] - pending_balance["credits"]
currency
string
The currency of this ledger object.
currency_exponent
int
The currency exponent of this ledger object.

Sample Balance Object

{
  "balances": {
    "pending_balance": {
      "credits": 25000,
      "debits": 10000,
      "amount": 15000,
      "currency": "USD",
      "currency_exponent": 2
    },
    "posted_balance": {
      "credits": 20000,
      "debits": 0,
      "amount": 20000,
      "currency": "USD",
      "currency_exponent": 2
    },
    "available_balance": {
      "credits": 20000,
      "debits": 10000,
      "amount": 10000,
      "currency": "USD",
      "currency_exponent": 2
    }
  }
}