Update Bank Account Token
POST
https://api.mpay.com.au/token/v1/updateAustralianBankAccount
Body Parameters
- bodytokenAustralianBankAccountPayloadClassrequiredExample
{ "bankAccountName": "John Smith", "bsb": "000-000", "bankAccountNumber": "123456789", "accountNumber": "1234567890123456", "tokenToUpdate": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47", "description": "Savings Account" }Description- bankAccountNamestringrequiredExampleDescriptionDefaultJohn SmithMin Length2Max Length140Pattern^[A-Za-z0-9 '\-\.]{2,140}$
- bsbstringrequiredExampleDescriptionDefault000-000Pattern^[0-9]{3}-?[0-9]{3}$
- bankAccountNumberstringrequiredExampleDescriptionDefault123456789Pattern^[0-9]{1,9}$
- accountNumberstringrequiredExampleDescriptionDefault1234567890123456Pattern^[0-9]{16}$
- tokenToUpdatestringExampleDescriptionDefault0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47Pattern^$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- descriptionstringExampleDescriptionDefaultSavings AccountMax Length255Pattern^.{0,255}$
Responses
200
- tokenUpdateResponse_V1Example
{ "token": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47", "hint": "Savings Account ****6789", "durationMs": 42, "status": "Ok", "statusDescription": "Operation completed successfully" }Description- tokenstringExampleDescriptionDefault0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47Pattern^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
- hintstringExampleDescriptionDefaultSavings Account ****6789Max Length140Pattern^.{0,140}$
- durationMsinteger<int64>ExampleDescriptionDefault42Formatint64Minimum0
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyMax Length500Pattern^.{0,500}$
400
- errorResponse_V1Example
{ "durationMs": 12, "status": "Error", "statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)" }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
401
- errorResponse_V1Example
{ "durationMs": 5, "status": "Unauthorized", "statusDescription": "Authentication failed. Provide a valid API key as the basic authentication username." }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
500
- errorResponse_V1Example
{ "durationMs": 30, "status": "Error", "statusDescription": "An unexpected error occurred while processing the request." }Description- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultValidation failed: bsb must be 3-3 digits. (Eg. 000-000)Max Length500Pattern^.{0,500}$
curl
curl --request POST \
--url https://api.mpay.com.au/token/v1/updateAustralianBankAccount \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"bankAccountName": "John Smith",
"bsb": "000-000",
"bankAccountNumber": "123456789",
"accountNumber": "1234567890123456",
"tokenToUpdate": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47",
"description": "Savings Account"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"bankAccountName": "John Smith",
"bsb": "000-000",
"bankAccountNumber": "123456789",
"accountNumber": "1234567890123456",
"tokenToUpdate": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47",
"description": "Savings Account"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/token/v1/updateAustralianBankAccount", 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/token/v1/updateAustralianBankAccount")
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({
"bankAccountName": "John Smith",
"bsb": "000-000",
"bankAccountNumber": "123456789",
"accountNumber": "1234567890123456",
"tokenToUpdate": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47",
"description": "Savings Account"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/token/v1/updateAustralianBankAccount"
payload = json.dumps({
"bankAccountName": "John Smith",
"bsb": "000-000",
"bankAccountNumber": "123456789",
"accountNumber": "1234567890123456",
"tokenToUpdate": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47",
"description": "Savings Account"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success. The token payload was updated and the response contains the token and its hint.
{
"token": "0f1c7c2e-9f4a-4c53-9e66-2f0b6a9d1f47",
"hint": "Savings Account ****6789",
"durationMs": 42,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad Request — the request could not be processed because one or more fields are missing, malformed or failed validation. Check statusDescription for the field at fault.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}401
// Unauthorized — the API key is missing, invalid, or not permitted to call this endpoint. Pass your API key as the basic authentication username with no password.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}500
// Internal Server Error — the Platform encountered an unexpected condition and could not complete the request. Retry the request; if the error persists, contact Monoova support quoting the time of the call.
{
"durationMs": 12,
"status": "Error",
"statusDescription": "Validation failed: bsb must be 3-3 digits. (Eg. 000-000)"
}