Retrieve Transactions for a Ledger
POST
https://api.mpay.com.au/ledger/v1/transactions
Body Parameters
- bodyledgerTransactionRequestDetails_V1required
- ledgerAccountNumberstringExampleDescriptionDefault200000001Pattern^[0-9]{6,12}$
- startDatestringExampleDescriptionDefault2026-06-23Pattern^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2})?$
- endDatestringExampleDescriptionDefault2026-07-23Pattern^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2})?$
- skipstringExampleDescriptionDefault0Pattern^[0-9]+$
- takestringExampleDescriptionDefault50Pattern^[0-9]+$
- descendingstringExampleDescriptionDefaulttruePattern^(true|false)$
- useTimestringExampleDescriptionDefaultfalsePattern^(true|false)$
Responses
200
- ledgerTransactionsResponse_V1
- ledgerAccountsledgerTransactionAccountItem_V1[]Description
- ledgerAccountNumberstringExampleDescriptionDefault200000001Pattern^[0-9]{6,12}$
- ledgerUniqueReferencestringExampleDescriptionDefaultCUST-000123Pattern^.{1,50}$
- descriptionstringExampleDescriptionDefaultPrimary settlement ledger for Acme Pty LtdPattern^.{0,255}$
- namestringExampleDescriptionDefaultAcme Pty LtdPattern^.{1,140}$
- 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+)?$
- isClosedstringExampleDescriptionDefaultfalsePattern^(true|false)$
- openingBalancestringExampleDescriptionDefault100.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- closingBalancestringExampleDescriptionDefault150.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- totalDebitsstringExampleDescriptionDefault50.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- totalCreditsstringExampleDescriptionDefault100.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- transactionLineItemsledgerTransactionLineItem[]Description
- rowOrderstringExampleDescriptionDefault1Pattern^[0-9]+$
- mPaymentsIdstringExampleDescriptionDefault1234567Pattern^[0-9]+$
- transactionIdstringExampleDescriptionDefault7654321Pattern^[0-9]+$
- dateTimestringExampleDescriptionDefault2026-07-23T13:55:59Pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?$
- mAccountNamestringExampleDescriptionDefaultAcme Pty LtdPattern^.{1,140}$
- transactionTypestringExampleDescriptionDefaultNPPPattern^.{1,50}$
- subTransactionTypestringExampleDescriptionDefaultCreditTransferPattern^.{1,50}$
- creditstringExampleDescriptionDefault100.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- debitstringExampleDescriptionDefault50.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- runningBalancestringExampleDescriptionDefault150.00Pattern^-?[0-9]+(\.[0-9]{1,2})?$
- descriptionstringExampleDescriptionDefaultPayment received from Acme Pty LtdPattern^.{0,255}$
- 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/transactions \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"ledgerAccountNumber": "200000001",
"startDate": "2026-06-23",
"endDate": "2026-07-23",
"skip": "0",
"take": "50",
"descending": "true",
"useTime": "false"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"ledgerAccountNumber": "200000001",
"startDate": "2026-06-23",
"endDate": "2026-07-23",
"skip": "0",
"take": "50",
"descending": "true",
"useTime": "false"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/ledger/v1/transactions", 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/transactions")
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",
"startDate": "2026-06-23",
"endDate": "2026-07-23",
"skip": "0",
"take": "50",
"descending": "true",
"useTime": "false"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/ledger/v1/transactions"
payload = json.dumps({
"ledgerAccountNumber": "200000001",
"startDate": "2026-06-23",
"endDate": "2026-07-23",
"skip": "0",
"take": "50",
"descending": "true",
"useTime": "false"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful response.
{
"ledgerAccounts": [
{
"ledgerAccountNumber": "200000001",
"ledgerUniqueReference": "CUST-000123",
"description": "Primary settlement ledger for Acme Pty Ltd",
"name": "Acme Pty Ltd",
"createdDateTime": "2026-07-23T13:55:59",
"closedDateTime": "2026-07-23T13:55:59",
"isClosed": "false",
"openingBalance": "100.00",
"closingBalance": "150.00",
"totalDebits": "50.00",
"totalCredits": "100.00",
"transactionLineItems": [
{
"rowOrder": "1",
"mPaymentsId": "1234567",
"transactionId": "7654321",
"dateTime": "2026-07-23T13:55:59",
"mAccountName": "Acme Pty Ltd",
"transactionType": "NPP",
"subTransactionType": "CreditTransfer",
"credit": "100.00",
"debit": "50.00",
"runningBalance": "150.00",
"description": "Payment received from Acme Pty Ltd"
}
]
}
],
"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"
}