Get Account Status By BankAccount
GET
https://api.mpay.com.au/receivables/v1/statusByBankAccount/{bankAccountNumber}
Path Parameters
- bankAccountNumberstringrequiredExampleDescriptionDefault123456789Min Length9Max Length9Pattern^[0-9]{9}$
Query Parameters
- bsbstringExampleDescriptionDefault012-345Min Length6Max Length7Pattern^[0-9]{3}-?[0-9]{3}$
Responses
200
- cuscalStatusResponse_V1Example
{ "bsb": "012-345", "bankAccountNumber": "123456789", "bankAccountName": "Acme Pty Ltd", "clientUniqueId": "93bf57eb1e2c42cf8101509b4356741e", "isActive": true, "durationMs": 42, "status": "Ok", "statusDescription": "Operation completed successfully" }Description- bsbstringExampleDescriptionDefault012-345Min Length6Max Length7Pattern^[0-9]{3}-?[0-9]{3}$
- bankAccountNumberstringExampleDescriptionDefault123456789Min Length9Max Length9Pattern^[0-9]{9}$
- bankAccountNamestringExampleDescriptionDefaultAcme Pty LtdMin Length1Max Length32Pattern^[A-Za-z0-9 &'()+,./\-]{1,32}$
- clientUniqueIdstringExampleDescriptionDefault93bf57eb1e2c42cf8101509b4356741eMin Length1Max Length50Pattern^[A-Za-z0-9_-]{1,50}$
- isActivebooleanExampleDescriptionDefaulttruePattern^(true|false)$
- durationMsinteger<int64>ExampleDescriptionDefault42Formatint64Minimum0Pattern^[0-9]+$
- statusstringExampleDescriptionDefaultOkPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyMin Length1Max Length255Pattern^.{1,255}$
400
- errorResponse_V1Example
{ "status": "Error", "statusDescription": "One or more validation errors occurred", "errorCode": "InvalidBankAccountNumber", "errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.", "durationMs": 12 }Description- statusstringExampleDescriptionDefaultErrorPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOne or more validation errors occurredMin Length1Max Length255Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefaultInvalidBankAccountNumberMin Length1Max Length50Pattern^[A-Za-z0-9_.-]{1,50}$
- errorMessagestringExampleDescriptionDefaultThe supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.Min Length1Max Length500Pattern^.{1,500}$
- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0Pattern^[0-9]+$
401
- errorResponse_V1Example
{ "status": "Error", "statusDescription": "Authentication failed", "errorCode": "Unauthorized", "errorMessage": "The API key is missing or invalid. Pass your API key as the basic authentication username.", "durationMs": 8 }Description- statusstringExampleDescriptionDefaultErrorPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOne or more validation errors occurredMin Length1Max Length255Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefaultInvalidBankAccountNumberMin Length1Max Length50Pattern^[A-Za-z0-9_.-]{1,50}$
- errorMessagestringExampleDescriptionDefaultThe supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.Min Length1Max Length500Pattern^.{1,500}$
- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0Pattern^[0-9]+$
500
- errorResponse_V1Example
{ "status": "Error", "statusDescription": "An unexpected error occurred", "errorCode": "InternalServerError", "errorMessage": "An unexpected error occurred while processing the request. Please retry, and contact [email protected] if the problem persists.", "durationMs": 30 }Description- statusstringExampleDescriptionDefaultErrorPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOne or more validation errors occurredMin Length1Max Length255Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefaultInvalidBankAccountNumberMin Length1Max Length50Pattern^[A-Za-z0-9_.-]{1,50}$
- errorMessagestringExampleDescriptionDefaultThe supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.Min Length1Max Length500Pattern^.{1,500}$
- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0Pattern^[0-9]+$
curl
curl --request GET \
--url 'https://api.mpay.com.au/receivables/v1/statusByBankAccount/{bankAccountNumber}?bsb=012-345' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/receivables/v1/statusByBankAccount/{bankAccountNumber}?bsb=012-345", 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/receivables/v1/statusByBankAccount/{bankAccountNumber}?bsb=012-345")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/receivables/v1/statusByBankAccount/{bankAccountNumber}?bsb=012-345"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// successful validation
{
"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": "One or more validation errors occurred",
"errorCode": "InvalidBankAccountNumber",
"errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.",
"durationMs": 12
}401
// Unauthorized — authentication failed, or the API key was missing or invalid.
{
"status": "Error",
"statusDescription": "One or more validation errors occurred",
"errorCode": "InvalidBankAccountNumber",
"errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.",
"durationMs": 12
}500
// Internal Server Error — an unexpected error occurred while processing the request.
{
"status": "Error",
"statusDescription": "One or more validation errors occurred",
"errorCode": "InvalidBankAccountNumber",
"errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.",
"durationMs": 12
}