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

# List Balance Ledger Entries

> Retrieve a paginated list of balance ledger entries for your account. Use query parameters to filter by date range, event type, currency, or reference object.



## OpenAPI

````yaml get /balances/ledger
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.105.0
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /balances/ledger:
    get:
      tags:
        - Balance Ledger
      operationId: list_ledger_entries_merchant_handler
      parameters:
        - name: created_at_gte
          in: query
          description: Get events after this created time
          required: false
          schema:
            type: string
            format: date-time
          style: form
        - name: created_at_lte
          in: query
          description: Get events created before this time
          required: false
          schema:
            type: string
            format: date-time
          style: form
        - name: reference_object_id
          in: query
          description: >-
            Get events history of a specific object like
            payment/subscription/refund/dispute
          required: false
          schema:
            type: string
          style: form
        - name: event_type
          in: query
          description: Filter by Ledger Event Type
          required: false
          schema:
            type: string
            enum:
              - payment
              - refund
              - refund_reversal
              - dispute
              - dispute_reversal
              - tax
              - tax_reversal
              - payment_fees
              - refund_fees
              - refund_fees_reversal
              - dispute_fees
              - payout
              - payout_fees
              - payout_reversal
              - payout_fees_reversal
              - dodo_credits
              - adjustment
              - currency_conversion
              - abandoned_cart_recovery_fee
              - dunning_fees
              - payment_retry_fee
              - byop_fee
          style: form
        - name: currency
          in: query
          description: Filter by currency
          required: false
          schema:
            type: string
            enum:
              - AED
              - ALL
              - AMD
              - ANG
              - AOA
              - ARS
              - AUD
              - AWG
              - AZN
              - BAM
              - BBD
              - BDT
              - BGN
              - BHD
              - BIF
              - BMD
              - BND
              - BOB
              - BRL
              - BSD
              - BWP
              - BYN
              - BZD
              - CAD
              - CHF
              - CLP
              - CNY
              - COP
              - CRC
              - CUP
              - CVE
              - CZK
              - DJF
              - DKK
              - DOP
              - DZD
              - EGP
              - ETB
              - EUR
              - FJD
              - FKP
              - GBP
              - GEL
              - GHS
              - GIP
              - GMD
              - GNF
              - GTQ
              - GYD
              - HKD
              - HNL
              - HRK
              - HTG
              - HUF
              - IDR
              - ILS
              - INR
              - IQD
              - JMD
              - JOD
              - JPY
              - KES
              - KGS
              - KHR
              - KMF
              - KRW
              - KWD
              - KYD
              - KZT
              - LAK
              - LBP
              - LKR
              - LRD
              - LSL
              - LYD
              - MAD
              - MDL
              - MGA
              - MKD
              - MMK
              - MNT
              - MOP
              - MRU
              - MUR
              - MVR
              - MWK
              - MXN
              - MYR
              - MZN
              - NAD
              - NGN
              - NIO
              - NOK
              - NPR
              - NZD
              - OMR
              - PAB
              - PEN
              - PGK
              - PHP
              - PKR
              - PLN
              - PYG
              - QAR
              - RON
              - RSD
              - RUB
              - RWF
              - SAR
              - SBD
              - SCR
              - SEK
              - SGD
              - SHP
              - SLE
              - SLL
              - SOS
              - SRD
              - SSP
              - STN
              - SVC
              - SZL
              - THB
              - TND
              - TOP
              - TRY
              - TTD
              - TWD
              - TZS
              - UAH
              - UGX
              - USD
              - UYU
              - UZS
              - VES
              - VND
              - VUV
              - WST
              - XAF
              - XCD
              - XOF
              - XPF
              - YER
              - ZAR
              - ZMW
          style: form
        - name: limit
          in: query
          description: 'Min : 1, Max : 100, default 10'
          required: false
          schema:
            type: integer
            format: int64
          style: form
        - name: page_size
          in: query
          description: Page size default is 10 max is 100
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
        - name: page_number
          in: query
          description: Page number default is 0
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
          style: form
      responses:
        '200':
          description: Balance ledger entries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBalanceLedgerEntriesResponse'
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import DodoPayments from 'dodopayments';


            const client = new DodoPayments({
              bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
            });


            // Automatically fetches more pages as needed.

            for await (const balanceLedgerEntry of
            client.balances.retrieveLedger()) {
              console.log(balanceLedgerEntry.id);
            }
        - lang: Python
          source: |-
            import os
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
            )
            page = client.balances.retrieve_ledger()
            page = page.items[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\tpage, err := client.Balances.GetLedger(context.TODO(), dodopayments.BalanceGetLedgerParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: >-
            package com.dodopayments.api.example;


            import com.dodopayments.api.client.DodoPaymentsClient;

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;

            import
            com.dodopayments.api.models.balances.BalanceRetrieveLedgerPage;

            import
            com.dodopayments.api.models.balances.BalanceRetrieveLedgerParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    BalanceRetrieveLedgerPage page = client.balances().retrieveLedger();
                }
            }
        - lang: Kotlin
          source: >-
            package com.dodopayments.api.example


            import com.dodopayments.api.client.DodoPaymentsClient

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient

            import
            com.dodopayments.api.models.balances.BalanceRetrieveLedgerPage

            import
            com.dodopayments.api.models.balances.BalanceRetrieveLedgerParams


            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                val page: BalanceRetrieveLedgerPage = client.balances().retrieveLedger()
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            page = dodo_payments.balances.retrieve_ledger

            puts(page)
        - lang: PHP
          source: |-
            <?php

            require_once dirname(__DIR__) . '/vendor/autoload.php';

            use Dodopayments\Client;
            use Dodopayments\Core\Exceptions\APIException;

            $client = new Client(
              bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
              environment: 'test_mode',
            );

            try {
              $page = $client->balances->retrieveLedger(
                createdAtGte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
                createdAtLte: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
                currency: 'AED',
                eventType: 'payment',
                limit: 0,
                pageNumber: 0,
                pageSize: 0,
                referenceObjectID: 'reference_object_id',
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using DodoPayments.Client;
            using DodoPayments.Client.Models.Balances;

            DodoPaymentsClient client = new();

            BalanceRetrieveLedgerParams parameters = new();

            var page = await client.Balances.RetrieveLedger(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
components:
  schemas:
    ListBalanceLedgerEntriesResponse:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/BalanceLedgerEntryResponse'
    BalanceLedgerEntryResponse:
      type: object
      required:
        - id
        - business_id
        - event_type
        - amount
        - currency
        - is_credit
        - created_at
        - usd_equivalent_amount
      properties:
        after_balance:
          type:
            - integer
            - 'null'
          format: int64
        amount:
          type: integer
          format: int64
        before_balance:
          type:
            - integer
            - 'null'
          format: int64
        business_id:
          type: string
        created_at:
          type: string
          format: date-time
        currency:
          $ref: '#/components/schemas/Currency'
        description:
          type:
            - string
            - 'null'
        event_type:
          $ref: '#/components/schemas/LedgerEventType'
        id:
          type: string
        is_credit:
          type: boolean
        reference_object_id:
          type:
            - string
            - 'null'
        usd_equivalent_amount:
          type: integer
          format: int64
    Currency:
      type: string
      enum:
        - AED
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BWP
        - BYN
        - BZD
        - CAD
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HRK
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SEK
        - SGD
        - SHP
        - SLE
        - SLL
        - SOS
        - SRD
        - SSP
        - STN
        - SVC
        - SZL
        - THB
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    LedgerEventType:
      type: string
      enum:
        - payment
        - refund
        - refund_reversal
        - dispute
        - dispute_reversal
        - tax
        - tax_reversal
        - payment_fees
        - refund_fees
        - refund_fees_reversal
        - dispute_fees
        - payout
        - payout_fees
        - payout_reversal
        - payout_fees_reversal
        - dodo_credits
        - adjustment
        - currency_conversion
        - abandoned_cart_recovery_fee
        - dunning_fees
        - payment_retry_fee
        - byop_fee
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````