---
title: Retrieve Current Ledger Balance
slug: api/retrieve-current-ledger-balance
docTags: 
createdAt: 2026-08-20T02:00:14.436Z
---

{
  "id": "Qx7PNfHUT7V4m3gDnnKFx",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.mpay.com.au/ledger/v1/balance/{ledgerAccountNumber}",
    "servers": [
      {
        "url": "https://api.mpay.com.au/ledger/v1/balance/{ledgerAccountNumber}",
        "description": "Production URL"
      },
      {
        "url": "https://api.m-pay.com.au/ledger/v1/balance/{ledgerAccountNumber}",
        "description": "Sandbox URL"
      }
    ],
    "name": "Retrieve Current Ledger Balance",
    "description": "<p>Query the current balance of a single ledger. This endpoint also returns a lightweight set of fields related to the ledger account, such as the status and creation date.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "ledgerAccountNumber",
          "type": "string",
          "example": "200000001",
          "description": "The unique identifier for the ledger account whose balance is being retrieved.",
          "default": "200000001",
          "pattern": "^[0-9]{6,12}$"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "basicAuth",
          "name": "basicAuth",
          "kind": "optional",
          "type": "http",
          "description": "<p>To authenticate using basic authentication, generate an API key and pass it as the username. No password is required.</p>",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful response.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ledgerBalanceResponse_V1",
            "schema": [
              {
                "name": "balance",
                "kind": "optional",
                "type": "string",
                "description": "The current balance of the ledger.",
                "example": "100.00",
                "default": "100.00",
                "pattern": "^-?[0-9]+(\\.[0-9]{1,2})?$"
              },
              {
                "name": "ledgerAccountNumber",
                "kind": "optional",
                "type": "string",
                "description": "The unique identifier for the ledger account.",
                "example": "200000001",
                "default": "200000001",
                "pattern": "^[0-9]{6,12}$"
              },
              {
                "name": "ledgerUniqueReference",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Optional</strong>. The unique reference for the ledger.</p>",
                "example": "CUST-000123",
                "default": "CUST-000123",
                "pattern": "^.{1,50}$"
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Optional</strong>. Description of the ledger, possibly containing JSON encoded data.</p>",
                "example": "Primary settlement ledger for Acme Pty Ltd",
                "default": "Primary settlement ledger for Acme Pty Ltd",
                "pattern": "^.{0,255}$"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Optional</strong>. Name of the ledger.</p>",
                "example": "Acme Pty Ltd",
                "default": "Acme Pty Ltd",
                "pattern": "^.{1,140}$"
              },
              {
                "name": "isClosed",
                "kind": "optional",
                "type": "string",
                "description": "Indicates whether the ledger is currently closed.",
                "example": "false",
                "default": "false",
                "pattern": "^(true|false)$"
              },
              {
                "name": "createdDateTime",
                "kind": "optional",
                "type": "string",
                "description": "The datetime when the ledger was created.",
                "example": "2026-07-23T13:55:59",
                "default": "2026-07-23T13:55:59",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?$"
              },
              {
                "name": "closedDateTime",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Conditional</strong>. The datetime when the ledger was closed. Present only if the ledger has been closed.</p>",
                "example": "2026-07-23T13:55:59",
                "default": "2026-07-23T13:55:59",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?$"
              },
              {
                "name": "automatcherBankAccountNumber",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Optional</strong>. The bank account number of the linked automatcher.</p>",
                "example": "123456789",
                "default": "123456789",
                "pattern": "^[0-9]{6,9}$"
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "string",
                "description": "The total time in milliseconds that the Platform took to process the request.",
                "example": "42",
                "default": "42",
                "pattern": "^[0-9]+$"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "This is the status of the request. A code of 'Ok' indicates no errors.",
                "example": "Ok",
                "default": "Ok",
                "pattern": "^.{1,50}$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>This is a description of the status. If an 'Ok' status is returned, then this will be 'Operation completed successfully'.</p>",
                "example": "Operation completed successfully",
                "default": "Operation completed successfully",
                "pattern": "^.{1,255}$"
              }
            ],
            "modelRef": "#/components/schemas/ledgerBalanceResponse_V1",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Bad Request - the request was malformed or contained invalid parameters.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "errorResponse_V1",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "The status of the request. A value other than 'Ok' indicates that the request failed.",
                "example": "Error",
                "default": "Error",
                "pattern": "^.{1,50}$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error that occurred.</p>",
                "example": "Invalid ledger account number.",
                "default": "Invalid ledger account number.",
                "pattern": "^.{1,255}$"
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Conditional</strong>. The error code returned by the platform. Present only when the request fails.</p>",
                "example": "400",
                "default": "400",
                "pattern": "^[0-9]{3,5}$"
              },
              {
                "name": "errorMessage",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Conditional</strong>. Detailed error message describing the cause of the failure. Present only when the request fails.</p>",
                "example": "The supplied ledger account number could not be found.",
                "default": "The supplied ledger account number could not be found.",
                "pattern": "^.{1,255}$"
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "string",
                "description": "The total time in milliseconds that the Platform took to process the request.",
                "example": "42",
                "default": "42",
                "pattern": "^[0-9]+$"
              }
            ],
            "modelRef": "#/components/schemas/errorResponse_V1",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized - authentication failed, or the API key was missing or invalid.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "errorResponse_V1",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "The status of the request. A value other than 'Ok' indicates that the request failed.",
                "example": "Error",
                "default": "Error",
                "pattern": "^.{1,50}$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error that occurred.</p>",
                "example": "Invalid ledger account number.",
                "default": "Invalid ledger account number.",
                "pattern": "^.{1,255}$"
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Conditional</strong>. The error code returned by the platform. Present only when the request fails.</p>",
                "example": "400",
                "default": "400",
                "pattern": "^[0-9]{3,5}$"
              },
              {
                "name": "errorMessage",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Conditional</strong>. Detailed error message describing the cause of the failure. Present only when the request fails.</p>",
                "example": "The supplied ledger account number could not be found.",
                "default": "The supplied ledger account number could not be found.",
                "pattern": "^.{1,255}$"
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "string",
                "description": "The total time in milliseconds that the Platform took to process the request.",
                "example": "42",
                "default": "42",
                "pattern": "^[0-9]+$"
              }
            ],
            "modelRef": "#/components/schemas/errorResponse_V1",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>Internal Server Error - an unexpected error occurred while processing the request.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "errorResponse_V1",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string",
                "description": "The status of the request. A value other than 'Ok' indicates that the request failed.",
                "example": "Error",
                "default": "Error",
                "pattern": "^.{1,50}$"
              },
              {
                "name": "statusDescription",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error that occurred.</p>",
                "example": "Invalid ledger account number.",
                "default": "Invalid ledger account number.",
                "pattern": "^.{1,255}$"
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Conditional</strong>. The error code returned by the platform. Present only when the request fails.</p>",
                "example": "400",
                "default": "400",
                "pattern": "^[0-9]{3,5}$"
              },
              {
                "name": "errorMessage",
                "kind": "optional",
                "type": "string",
                "description": "<p><strong>Conditional</strong>. Detailed error message describing the cause of the failure. Present only when the request fails.</p>",
                "example": "The supplied ledger account number could not be found.",
                "default": "The supplied ledger account number could not be found.",
                "pattern": "^.{1,255}$"
              },
              {
                "name": "durationMs",
                "kind": "optional",
                "type": "string",
                "description": "The total time in milliseconds that the Platform took to process the request.",
                "example": "42",
                "default": "42",
                "pattern": "^[0-9]+$"
              }
            ],
            "modelRef": "#/components/schemas/errorResponse_V1",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "3imdQ_uKvEfuMTUJwM4ow",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.mpay.com.au/ledger/v1/balance/{ledgerAccountNumber} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "N1Y5VweNBo-geMvQoL8If",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.mpay.com.au/ledger/v1/balance/{ledgerAccountNumber}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "S-U-uHi2zU5n3PNWcYjtJ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.mpay.com.au/ledger/v1/balance/{ledgerAccountNumber}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "d4ADjHySYVVWWKF4y3Ogv",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.mpay.com.au/ledger/v1/balance/{ledgerAccountNumber}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "3imdQ_uKvEfuMTUJwM4ow"
    },
    "results": {
      "languages": [
        {
          "id": "hLe1UTRp6z5RshfK8BlbZ",
          "language": "200",
          "code": "// Successful response.\n{\n  \"balance\": \"100.00\",\n  \"ledgerAccountNumber\": \"200000001\",\n  \"ledgerUniqueReference\": \"CUST-000123\",\n  \"description\": \"Primary settlement ledger for Acme Pty Ltd\",\n  \"name\": \"Acme Pty Ltd\",\n  \"isClosed\": \"false\",\n  \"createdDateTime\": \"2026-07-23T13:55:59\",\n  \"closedDateTime\": \"2026-07-23T13:55:59\",\n  \"automatcherBankAccountNumber\": \"123456789\",\n  \"durationMs\": \"42\",\n  \"status\": \"Ok\",\n  \"statusDescription\": \"Operation completed successfully\"\n}"
        },
        {
          "id": "T8qEZHfz9eQrnxrYp9FV0",
          "language": "400",
          "code": "// Bad Request - the request was malformed or contained invalid parameters.\n{\n  \"status\": \"Error\",\n  \"statusDescription\": \"Invalid ledger account number.\",\n  \"errorCode\": \"400\",\n  \"errorMessage\": \"The supplied ledger account number could not be found.\",\n  \"durationMs\": \"42\"\n}"
        },
        {
          "id": "_u2OaeI3VdbqOxtvbz1g3",
          "language": "401",
          "code": "// Unauthorized - authentication failed, or the API key was missing or invalid.\n{\n  \"status\": \"Error\",\n  \"statusDescription\": \"Invalid ledger account number.\",\n  \"errorCode\": \"400\",\n  \"errorMessage\": \"The supplied ledger account number could not be found.\",\n  \"durationMs\": \"42\"\n}"
        },
        {
          "id": "Aua5Y7xPddz_qcgunkw5p",
          "language": "500",
          "code": "// Internal Server Error - an unexpected error occurred while processing the request.\n{\n  \"status\": \"Error\",\n  \"statusDescription\": \"Invalid ledger account number.\",\n  \"errorCode\": \"400\",\n  \"errorMessage\": \"The supplied ledger account number could not be found.\",\n  \"durationMs\": \"42\"\n}"
        }
      ],
      "selectedLanguageId": "hLe1UTRp6z5RshfK8BlbZ"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}