This page will help you get started with Ledgers.
With our ledger product, merchants have the ability to automatically track and calculate the amount of money that is due for payout to each merchant at any specific moment. This feature enables a streamlined process of managing financial transactions, reducing the need for manual calculations and tracking. In addition, it provides merchants with a clear and updated view of their financial obligations, thus ensuring timely and accurate payouts.
Accounts
An account tracks money in a particular currency. Depending on the type of the account, it could either be an asset, or liability for the merchant.
| Key | Type | Description |
|---|---|---|
| id | string | Unique identifier for the ledger account. |
| name | string | The name of the ledger account. e.g. Assets |
| currency | string | The currency of this account |
| description | string | Description for the account |
| account_type | string | One of credit_normal, debit_normal. If an account is credit_normal normal, then a credit would increase balance, if it's debit normal, debit would increase the balance. For example, liabilities accounts are credit_normal normal whereas assets accounts are debit_normal. |
| balances | object | The pending, total, and available balances for this ledger account. |
| metadata | object | Additional data represented as key-value pairs for internal references |
Transactions
Each transaction has either two or more entries to the ledger, to maintain double-entry accounting while making updates to the balance of the account
| Key | Type | Description |
|---|---|---|
| id | string | Unique ID for the transaction. |
| description | string | Description for the transaction |
| status | string | One of initiated, successful, or archived. |
| metadata | object | Additional data represented as key-value pairs for internal references |
| ledger_entries | array object | An array of ledger entries objects. |
| posted_at | datetime | The date and time when the ledger transaction posted. |
| effective_at | datetime | The time at which the ledger transaction happened for reporting purposes. |
Entries
| Key | Type | Description |
|---|---|---|
| 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 | int | 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³⁶. |
| ending_balance | object | The ending pending, total, and available balances for this ledger account. |
| status | string | Equal to the state of the ledger transaction when the ledger entry was created. One of pending, total, or archived. |
| metadata | object | Additional data represented as key-value pairs for internal references |