Ledger Entries

A ledger_entry represents an accounting entry within a parent ledger transaction. Its amount is denominated in the currency of the ledger it belongs to.

AttributeDescription
id
string
Unique identifier for the ledger entry.
ledger_account_id
string
ID of the ledger account.
ledger_account_currency
string
The currency of the ledger account
ledger_account_currency_exponent
int32
The currency exponent of the ledger account
direction
string
Either credit or debit.
amount
int
Value in specified currency's smallest unit. e.g. $10 would be represented as 1000. Can be any integer up to 10³⁶.
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.
resulting_ledger_account_balances
object
The resulting 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.
This is present only when the Ledger Entry is first created or updated with show_resulting_ledger_account_balances set as true for the Ledger Entry, otherwise the field will be null.
status
string
Equal to the state of the ledger transaction when the ledger entry was created. One of pending, posted, or archived.
metadata
object
Additional data represented as key-value pairs. Both the key and value must be strings. See Metadata.
{
  "id": "2a9b522e-5be3-49bc-b607-a09f9786dc3c",
  "object": "ledger_entry",
  "live_mode": true,
  "amount": 1500000000,
  "direction": "debit",
  "status": "pending",
  "ledger_account_id": "063da2e3-4a37-4abf-8626-57d25bd6d441",
  "ledger_account_currency": "USD",
  "ledger_account_currency_exponent": 2,
  "ledger_account_lock_version": 57001,
  "ledger_transaction_id": "d376dd4e-1c4f-4ba2-9b13-db63c04471e0",
  "resulting_ledger_account_balances": {
    "pending_balance": {
      "credits": 0,
      "debits": 0,
      "amount": 0,
      "currency": "USD",
      "currency_exponent": 2
    },
    "posted_balance": {
      "credits": 0,
      "debits": 0,
      "amount": 0,
      "currency": "USD",
      "currency_exponent": 2
    },
    "available_balance": {
      "credits": 0,
      "debits": 0,
      "amount": 0,
      "currency": "USD",
      "currency_exponent": 2
    }
  },
  "discarded_at": null,
  "created_at": "2020-08-04T16:58:51Z",
  "updated_at": "2020-08-04T16:58:51Z",
  "metadata": {}
}