> ## Documentation Index
> Fetch the complete documentation index at: https://ownpay.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> OwnPay is licensed under AGPL-3.0 and is completely free - no licensing fees.
> Production docs URL: https://ownpay.org/docs - append .md to any page URL for clean markdown.
> OwnPay requires PHP 8.3+, MySQL/MariaDB, and Redis.
> MCP server available at https://ownpay.org/docs/mcp for programmatic documentation queries.
> Use root-relative links (e.g. /quickstart) for internal navigation - do NOT include /docs prefix.
> Plugin development: consult /developer/plugin-types/ pages for correct interfaces and manifests.

# Ledger and Accounting - Double-Entry Journal Entries

> Browse double-entry bookkeeping journal entries, review asset and liability balances, and follow transaction audit trails per brand in OwnPay.

The Ledger page provides a transparent, GAAP-compliant double-entry accounting view of all financial movements for your brand. It displays the active brand's net balance and lists individual journal postings (debits and credits) with their corresponding references, types, amounts, and descriptions.

## Getting here

1. Log in to the OwnPay admin dashboard
2. Under the **PAYMENTS** section in the left sidebar, click **Ledger**

## Page sections

### 1. Account summary header

* **Current Balance:** The net total of all posted ledger entries in the merchant's default currency

### 2. Ledger entries table

* **DATE:** The exact timestamp when the double-entry movement was recorded
* **REFERENCE:** The unique identifier (such as Transaction ID, Invoice ID, or Checkout Token)
* **TYPE:** The direction of the financial movement:
  * **Debit (DR):** Increases assets or expenses; decreases liabilities, equity, or revenue
  * **Credit (CR):** Increases liabilities, equity, or revenue; decreases assets or expenses
* **AMOUNT:** The cash value of the entry in the brand's default currency
* **STATUS:** The posting status (typically `posted` once successfully written and balanced)
* **DESCRIPTION:** Text describing the nature of the entry

## The double-entry model

OwnPay automatically registers balanced entries for every transaction. When a checkout completes:

* A credit (CR) entry is posted to the brand's payable account (`MERCHANT_PAYABLE`) representing revenue
* A debit (DR) entry is posted to the asset account representing the processing gateway balance

## Best practices

* Verify the **Current Balance** against your physical gateway summaries (bKash/Nagad/Stripe portals) weekly
* Use the **REFERENCE** field to trace transaction roots whenever customer disputes or chargebacks arise
* Do not expect the ledger balance to update instantly for offline or unapproved manual gateways
* Do not manually modify the database tables `op_ledger_entries` or `op_ledger_accounts` as it will break the double-entry balance validation constraints

<Warning>
  Every ledger transaction must balance. The sum of credits must equal the sum of debits. Do not initiate manually customized payments that bypass the transactional API, as this will lead to ledger imbalance warnings and transaction rollbacks.
</Warning>

## Common mistakes and troubleshooting

| Symptom                                                   | Likely Cause                                                                                      | Fix                                                             |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| Current balance does not match my gateway account balance | Fees or pending payouts are not yet posted to the ledger, or manual gateway approvals are pending | Check the **Balance Verification** page under Reports & Finance |
| No ledger entries are appearing                           | You are scoped to a newly created brand or a brand with zero transaction history                  | Ensure you have processed at least one successful checkout      |

## Related pages

* [Transactions](/user-guide/payments/transactions) - View customer details and payment gateway statuses
* [Invoices](/user-guide/payments/invoices) - Bill customers and track payment status
* [Balance Verification](/user-guide/reports-finance/balance-verification) - Audit and verify physical ledger balances


## Related topics

- [Double-Entry Ledger - Built-in Accounting for Payments](/docs/concepts/ledger.md)
- [Features and Capabilities](/docs/resources/features.md)
- [OwnPay Architecture: PHP Core, Middleware, and Plugins](/docs/resources/architecture.md)
- [List Outbound SMS Queue](/docs/api-reference/list-outbound-sms-queue.md)
- [Transactions - View Payments, Refunds, and Gateway Status](/docs/user-guide/payments/transactions.md)
