Retrieve Financial Details of a Ledger
POST
https://api.mpay.com.au/ledger/v1/financials
Body Parameters
- bodyledgerFinancialsBody_V1required
- ledgerAccountNumberstringExampleDescriptionDefault200000001Pattern^[0-9]{6,12}$
- includeClosedstringExampleDescriptionDefaultfalsePattern^(true|false)$
Responses
200
- ledgerFinancialsResponse_V1
- ledgerAccountFinancialsledgerFinancialsResponseItem_V1[]Description
- ledgerAccountNumberstringExampleDescriptionDefault200000001Pattern^[0-9]{6,12}$
- ledgerDetailsledgerDetailsDescription
- createdDateTimestringExampleDescriptionDefault2026-07-23T13:55:59Pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
- closedDateTimestringExampleDescriptionDefault2026-07-23T13:55:59Pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
- ledgerAccountNumberstringExampleDescriptionDefault200000001Pattern^[0-9]{6,12}$
- ledgerUniqueReferencestringExampleDescriptionDefaultCUST-000123Pattern^.{1,50}$
- descriptionstringExampleDescriptionDefaultPrimary settlement ledger for Acme Pty LtdPattern^.{0,255}$
- namestringExampleDescriptionDefaultAcme Pty LtdPattern^.{1,140}$
- lastTransactionDatestringExampleDescriptionDefault2026-07-23T13:55:59Pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
- isClosedstringExampleDescriptionDefaultfalsePattern^(true|false)$
- financialsmWalletFinancialsDescription
- actualBalancestringExampleDescriptionDefault100.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- availableSpendstringExampleDescriptionDefault100.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- availableLoadstringExampleDescriptionDefault900.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- maximumBalancestringExampleDescriptionDefault1000.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- ABNstringExampleDescriptionDefault51824753556Pattern^[0-9]{11}$
- automatcherDetailsledgerAutomatcherDetails_V1Description
- bsbstringExampleDescriptionDefault012-345Pattern^[0-9]{3}-?[0-9]{3}$
- bankAccountNumberstringExampleDescriptionDefault123456789Pattern^[0-9]{6,9}$
- bankAccountNamestringExampleDescriptionDefaultAcme Pty LtdPattern^.{1,140}$
- clientUniqueIdstringExampleDescriptionDefault93bf57eb1e2c42cf8101509b4356741ePattern^[0-9a-fA-F]{32}$
- isActivestringExampleDescriptionDefaulttruePattern^(true|false)$
- durationMsstringExampleDescriptionDefault42Pattern^[0-9]+$
- statusstringExampleDescriptionDefaultOkPattern^.{1,50}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyPattern^.{1,255}$
400
- errorResponse_V1
- statusstringExampleDescriptionDefaultErrorPattern^.{1,50}$
- statusDescriptionstringExampleDescriptionDefaultInvalid ledger account number.Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefault400Pattern^[0-9]{3,5}$
- errorMessagestringExampleDescriptionDefaultThe supplied ledger account number could not be found.Pattern^.{1,255}$
- durationMsstringExampleDescriptionDefault42Pattern^[0-9]+$
401
- errorResponse_V1
- statusstringExampleDescriptionDefaultErrorPattern^.{1,50}$
- statusDescriptionstringExampleDescriptionDefaultInvalid ledger account number.Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefault400Pattern^[0-9]{3,5}$
- errorMessagestringExampleDescriptionDefaultThe supplied ledger account number could not be found.Pattern^.{1,255}$
- durationMsstringExampleDescriptionDefault42Pattern^[0-9]+$
500
- errorResponse_V1
- statusstringExampleDescriptionDefaultErrorPattern^.{1,50}$
- statusDescriptionstringExampleDescriptionDefaultInvalid ledger account number.Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefault400Pattern^[0-9]{3,5}$
- errorMessagestringExampleDescriptionDefaultThe supplied ledger account number could not be found.Pattern^.{1,255}$
- durationMsstringExampleDescriptionDefault42Pattern^[0-9]+$
curl
curl --request POST \
--url https://api.mpay.com.au/ledger/v1/financials \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"ledgerAccountNumber": "200000001",
"includeClosed": "false"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"ledgerAccountNumber": "200000001",
"includeClosed": "false"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/ledger/v1/financials", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.mpay.com.au/ledger/v1/financials")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"ledgerAccountNumber": "200000001",
"includeClosed": "false"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/ledger/v1/financials"
payload = json.dumps({
"ledgerAccountNumber": "200000001",
"includeClosed": "false"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful response.
{
"ledgerAccountFinancials": [
{
"ledgerAccountNumber": "200000001",
"ledgerDetails": {
"createdDateTime": "2026-07-23T13:55:59",
"closedDateTime": "2026-07-23T13:55:59",
"ledgerAccountNumber": "200000001",
"ledgerUniqueReference": "CUST-000123",
"description": "Primary settlement ledger for Acme Pty Ltd",
"name": "Acme Pty Ltd",
"lastTransactionDate": "2026-07-23T13:55:59",
"isClosed": "false",
"financials": {
"actualBalance": "100.00",
"availableSpend": "100.00",
"availableLoad": "900.00",
"maximumBalance": "1000.00"
},
"ABN": "51824753556"
},
"automatcherDetails": {
"bsb": "012-345",
"bankAccountNumber": "123456789",
"bankAccountName": "Acme Pty Ltd",
"clientUniqueId": "93bf57eb1e2c42cf8101509b4356741e",
"isActive": "true"
}
}
],
"durationMs": "42",
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad Request - the request was malformed or contained invalid parameters.
{
"status": "Error",
"statusDescription": "Invalid ledger account number.",
"errorCode": "400",
"errorMessage": "The supplied ledger account number could not be found.",
"durationMs": "42"
}401
// Unauthorized - authentication failed, or the API key was missing or invalid.
{
"status": "Error",
"statusDescription": "Invalid ledger account number.",
"errorCode": "400",
"errorMessage": "The supplied ledger account number could not be found.",
"durationMs": "42"
}500
// Internal Server Error - an unexpected error occurred while processing the request.
{
"status": "Error",
"statusDescription": "Invalid ledger account number.",
"errorCode": "400",
"errorMessage": "The supplied ledger account number could not be found.",
"durationMs": "42"
}