Update a PayID's Status
POST
https://api.mpay.com.au/receivables/v1/payid/updatePayIdStatus
Body Parameters
- bodyPayIdUpdateStatusBody_V1requiredDescription
- payIdstringrequiredExampleDescriptionDefaultPattern^[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9-]{1,63}(\.[A-Za-z0-9-]{1,63})+$
- statusstringrequiredExampleDescriptionDefaultEnablePattern^(Enable|Disable|Deregister|Port)$
- bankAccountNumberstringrequiredExampleDescriptionDefault410000123Pattern^[0-9]{6,10}$
- bsbstringExampleDescriptionDefault123-456Pattern^[0-9]{3}-?[0-9]{3}$
Responses
200
- PayIdUpdateStatusResponse_V1Description
- durationMsinteger<int32>ExampleDescriptionDefault74Formatint32Pattern^[0-9]{1,9}$
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyPattern^.{1,500}$
400
- ErrorResponseExample
{ "durationMs": 18, "status": "Fail", "statusDescription": "Request validation failed. bankAccountNumber is required and must contain digits only." }Description- durationMsinteger<int32>ExampleDescriptionDefault18Formatint32Pattern^[0-9]{1,9}$
- statusstringExampleDescriptionDefaultFailPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultRequest validation failed. bankAccountNumber is required and must contain digits only.Pattern^.{1,500}$
401
- ErrorResponseExample
{ "durationMs": 5, "status": "Unauthorized", "statusDescription": "Authentication failed. Supply a valid API key as the basic authentication username." }Description- durationMsinteger<int32>ExampleDescriptionDefault18Formatint32Pattern^[0-9]{1,9}$
- statusstringExampleDescriptionDefaultFailPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultRequest validation failed. bankAccountNumber is required and must contain digits only.Pattern^.{1,500}$
500
- ErrorResponseExample
{ "durationMs": 3021, "status": "Error", "statusDescription": "An unexpected error occurred while processing the request. Please try again later." }Description- durationMsinteger<int32>ExampleDescriptionDefault18Formatint32Pattern^[0-9]{1,9}$
- statusstringExampleDescriptionDefaultFailPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultRequest validation failed. bankAccountNumber is required and must contain digits only.Pattern^.{1,500}$
curl
curl --request POST \
--url https://api.mpay.com.au/receivables/v1/payid/updatePayIdStatus \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data-raw '{
"payId": "[email protected]",
"status": "Enable",
"bankAccountNumber": "410000123",
"bsb": "123-456"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"payId": "[email protected]",
"status": "Enable",
"bankAccountNumber": "410000123",
"bsb": "123-456"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/receivables/v1/payid/updatePayIdStatus", 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/payid/updatePayIdStatus")
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({
"payId": "[email protected]",
"status": "Enable",
"bankAccountNumber": "410000123",
"bsb": "123-456"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/receivables/v1/payid/updatePayIdStatus"
payload = json.dumps({
"payId": "[email protected]",
"status": "Enable",
"bankAccountNumber": "410000123",
"bsb": "123-456"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful validation. The PayID status was updated.
{
"durationMs": 74,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad Request — the request could not be processed because one or more fields failed validation, or the PayID or account details supplied are not valid.
{
"durationMs": 18,
"status": "Fail",
"statusDescription": "Request validation failed. bankAccountNumber is required and must contain digits only."
}401
// Unauthorized — the API key supplied in the basic authentication header is missing, invalid, or not permitted to access this resource.
{
"durationMs": 18,
"status": "Fail",
"statusDescription": "Request validation failed. bankAccountNumber is required and must contain digits only."
}500
// Internal Server Error — an unexpected error occurred while processing the request. Retry the request; if the error persists, contact Monoova support and quote the statusDescription.
{
"durationMs": 18,
"status": "Fail",
"statusDescription": "Request validation failed. bankAccountNumber is required and must contain digits only."
}