---
title: Retrieve Financial Details of a Ledger
slug: api/retrieve-financial-details-of-a-ledger
docTags: 
createdAt: 2026-08-20T02:00:14.436Z
---

{
  "id": "dOcEXFG6ggS6ID1J5n1Hi",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.mpay.com.au/ledger/v1/financials",
    "servers": [
      {
        "url": "https://api.mpay.com.au/ledger/v1/financials",
        "description": "Production URL"
      },
      {
        "url": "https://api.m-pay.com.au/ledger/v1/financials",
        "description": "Sandbox URL"
      }
    ],
    "name": "Retrieve Financial Details of a Ledger",
    "description": "<p>This endpoint returns the automatcher details and financials for a ledger. The financials include the available balance, allowed spend &#x26; and allowed load, and the maximum balance that can be held within the ledger account.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "ledgerFinancialsBody_V1",
          "schema": [
            {
              "name": "ledgerAccountNumber",
              "kind": "optional",
              "type": "string",
              "description": "Ledger account number to retrieve financials for.",
              "example": "200000001",
              "default": "200000001",
              "pattern": "^[0-9]{6,12}$"
            },
            {
              "name": "includeClosed",
              "kind": "optional",
              "type": "string",
              "description": "<p><strong>Optional</strong>. Include financial details of closed accounts. Defaults to false.</p>",
              "example": "false",
              "default": "false",
              "pattern": "^(true|false)$"
            }
          ],
          "modelRef": "#/components/schemas/ledgerFinancialsBody_V1",
          "isExpanded": true
        }
      ],
      "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": "ledgerFinancialsResponse_V1",
            "schema": [
              {
                "name": "ledgerAccountFinancials",
                "kind": "optional",
                "type": "array",
                "description": "<p><strong>Optional</strong>. The list of ledger accounts and their financial details.</p>",
                "modelRef": "#/components/schemas/ledgerFinancialsResponseItem_V1",
                "customType": "ledgerFinancialsResponseItem_V1[]",
                "schema": [
                  {
                    "name": "ledgerAccountNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "The unique identifier for the ledger account.",
                    "example": "200000001",
                    "default": "200000001",
                    "pattern": "^[0-9]{6,12}$"
                  },
                  {
                    "name": "ledgerDetails",
                    "kind": "optional",
                    "type": "object",
                    "description": "The details of the ledger account.",
                    "modelRef": "#/components/schemas/ledgerDetails",
                    "customType": "ledgerDetails",
                    "schema": [
                      {
                        "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": "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>. Your unique identifier for the ledger account.</p>",
                        "example": "CUST-000123",
                        "default": "CUST-000123",
                        "pattern": "^.{1,50}$"
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p><strong>Optional</strong>. A free text field describing the ledger account.</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>. Your alias for the ledger account. Can be used to identify a ledger or underlying customer.</p>",
                        "example": "Acme Pty Ltd",
                        "default": "Acme Pty Ltd",
                        "pattern": "^.{1,140}$"
                      },
                      {
                        "name": "lastTransactionDate",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p><strong>Conditional</strong>. The datetime when the last transaction was received or made from the ledger. Present only if at least one transaction has occurred.</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": "isClosed",
                        "kind": "optional",
                        "type": "string",
                        "description": "Indicates whether the ledger is currently closed.",
                        "example": "false",
                        "default": "false",
                        "pattern": "^(true|false)$"
                      },
                      {
                        "name": "financials",
                        "kind": "optional",
                        "type": "object",
                        "description": "The financial position of the ledger account.",
                        "modelRef": "#/components/schemas/mWalletFinancials",
                        "customType": "mWalletFinancials",
                        "schema": [
                          {
                            "name": "actualBalance",
                            "kind": "optional",
                            "type": "string",
                            "description": "The current balance of the ledger account.",
                            "example": "100.00",
                            "default": "100.00",
                            "pattern": "^-?[0-9]+(\\.[0-9]{1,2})?$"
                          },
                          {
                            "name": "availableSpend",
                            "kind": "optional",
                            "type": "string",
                            "description": "The amount available to debit from the ledger.",
                            "example": "100.00",
                            "default": "100.00",
                            "pattern": "^-?[0-9]+(\\.[0-9]{1,2})?$"
                          },
                          {
                            "name": "availableLoad",
                            "kind": "optional",
                            "type": "string",
                            "description": "The amount available to credit from the ledger.",
                            "example": "900.00",
                            "default": "900.00",
                            "pattern": "^-?[0-9]+(\\.[0-9]{1,2})?$"
                          },
                          {
                            "name": "maximumBalance",
                            "kind": "optional",
                            "type": "string",
                            "description": "The maximum balance that can be held by the ledger.",
                            "example": "1000.00",
                            "default": "1000.00",
                            "pattern": "^-?[0-9]+(\\.[0-9]{1,2})?$"
                          }
                        ]
                      },
                      {
                        "name": "ABN",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p><strong>Optional</strong>. The ABN of the payee.</p>",
                        "example": "51824753556",
                        "default": "51824753556",
                        "pattern": "^[0-9]{11}$"
                      }
                    ]
                  },
                  {
                    "name": "automatcherDetails",
                    "kind": "optional",
                    "type": "object",
                    "description": "The details of the automatcher linked to the ledger account.",
                    "modelRef": "#/components/schemas/ledgerAutomatcherDetails_V1",
                    "customType": "ledgerAutomatcherDetails_V1",
                    "schema": [
                      {
                        "name": "bsb",
                        "kind": "optional",
                        "type": "string",
                        "description": "The BSB of the linked Automatcher.",
                        "example": "012-345",
                        "default": "012-345",
                        "pattern": "^[0-9]{3}-?[0-9]{3}$"
                      },
                      {
                        "name": "bankAccountNumber",
                        "kind": "optional",
                        "type": "string",
                        "description": "The bank account number of the linked Automatcher.",
                        "example": "123456789",
                        "default": "123456789",
                        "pattern": "^[0-9]{6,9}$"
                      },
                      {
                        "name": "bankAccountName",
                        "kind": "optional",
                        "type": "string",
                        "description": "The account name of the linked Automatcher.",
                        "example": "Acme Pty Ltd",
                        "default": "Acme Pty Ltd",
                        "pattern": "^.{1,140}$"
                      },
                      {
                        "name": "clientUniqueId",
                        "kind": "optional",
                        "type": "string",
                        "description": "A unique identifier assigned to the account.",
                        "example": "93bf57eb1e2c42cf8101509b4356741e",
                        "default": "93bf57eb1e2c42cf8101509b4356741e",
                        "pattern": "^[0-9a-fA-F]{32}$"
                      },
                      {
                        "name": "isActive",
                        "kind": "optional",
                        "type": "string",
                        "description": "Whether the automatcher is active.",
                        "example": "true",
                        "default": "true",
                        "pattern": "^(true|false)$"
                      }
                    ]
                  }
                ]
              },
              {
                "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/ledgerFinancialsResponse_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": "YtlpdJM9BQZPUG0nJb0bf",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.mpay.com.au/ledger/v1/financials \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"ledgerAccountNumber\": \"200000001\",\n     \"includeClosed\": \"false\"\n     }'"
        },
        {
          "id": "i7ea5j9ZuFA--akxc4NJl",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"ledgerAccountNumber\": \"200000001\",\n   \"includeClosed\": \"false\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.mpay.com.au/ledger/v1/financials\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ERWqoH79D8oOrbJYoqJyJ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.mpay.com.au/ledger/v1/financials\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"ledgerAccountNumber\": \"200000001\",\n   \"includeClosed\": \"false\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "atUlq9TlaAMarJmihp8-6",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.mpay.com.au/ledger/v1/financials\"\n\npayload = json.dumps({\n   \"ledgerAccountNumber\": \"200000001\",\n   \"includeClosed\": \"false\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "YtlpdJM9BQZPUG0nJb0bf"
    },
    "results": {
      "languages": [
        {
          "id": "lwxp5Ac2cQuLlq5DqwC3c",
          "language": "200",
          "code": "// Successful response.\n{\n  \"ledgerAccountFinancials\": [\n    {\n      \"ledgerAccountNumber\": \"200000001\",\n      \"ledgerDetails\": {\n        \"createdDateTime\": \"2026-07-23T13:55:59\",\n        \"closedDateTime\": \"2026-07-23T13:55:59\",\n        \"ledgerAccountNumber\": \"200000001\",\n        \"ledgerUniqueReference\": \"CUST-000123\",\n        \"description\": \"Primary settlement ledger for Acme Pty Ltd\",\n        \"name\": \"Acme Pty Ltd\",\n        \"lastTransactionDate\": \"2026-07-23T13:55:59\",\n        \"isClosed\": \"false\",\n        \"financials\": {\n          \"actualBalance\": \"100.00\",\n          \"availableSpend\": \"100.00\",\n          \"availableLoad\": \"900.00\",\n          \"maximumBalance\": \"1000.00\"\n        },\n        \"ABN\": \"51824753556\"\n      },\n      \"automatcherDetails\": {\n        \"bsb\": \"012-345\",\n        \"bankAccountNumber\": \"123456789\",\n        \"bankAccountName\": \"Acme Pty Ltd\",\n        \"clientUniqueId\": \"93bf57eb1e2c42cf8101509b4356741e\",\n        \"isActive\": \"true\"\n      }\n    }\n  ],\n  \"durationMs\": \"42\",\n  \"status\": \"Ok\",\n  \"statusDescription\": \"Operation completed successfully\"\n}"
        },
        {
          "id": "x5QGSufwhu01nVaFNfnvi",
          "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": "mejrljUzajxWswer-A_Mc",
          "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": "tiN73ajg7pirtRYVGSwMc",
          "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": "lwxp5Ac2cQuLlq5DqwC3c"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}