Set Account Status
POST
https://api.mpay.com.au/receivables/v1/status
Body Parameters
- bodycuscalStatusBody_V1requiredExample
{ "clientUniqueId": "93bf57eb1e2c42cf8101509b4356741e", "bankAccountNumber": "123456789", "bsb": "012-345", "isActive": true }Description- clientUniqueIdstringExampleDescriptionDefault93bf57eb1e2c42cf8101509b4356741eMin Length1Max Length50Pattern^[A-Za-z0-9_-]{1,50}$
- bankAccountNumberstringExampleDescriptionDefault123456789Min Length9Max Length9Pattern^[0-9]{9}$
- bsbstringExampleDescriptionDefault012-345Min Length6Max Length7Pattern^[0-9]{3}-?[0-9]{3}$
- isActivebooleanrequiredExampleDescriptionDefaulttruePattern^(true|false)$
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 POST \
--url https://api.mpay.com.au/receivables/v1/status \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"clientUniqueId": "93bf57eb1e2c42cf8101509b4356741e",
"bankAccountNumber": "123456789",
"bsb": "012-345",
"isActive": true
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"clientUniqueId": "93bf57eb1e2c42cf8101509b4356741e",
"bankAccountNumber": "123456789",
"bsb": "012-345",
"isActive": true
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/receivables/v1/status", 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/status")
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({
"clientUniqueId": "93bf57eb1e2c42cf8101509b4356741e",
"bankAccountNumber": "123456789",
"bsb": "012-345",
"isActive": true
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/receivables/v1/status"
payload = json.dumps({
"clientUniqueId": "93bf57eb1e2c42cf8101509b4356741e",
"bankAccountNumber": "123456789",
"bsb": "012-345",
"isActive": True
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", 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
}