Reset a mWallet PIN
POST
https://api.mpay.com.au/mWallet/v1/resetPin
Body Parameters
- bodymWalletResetPinrequiredDescription
- accountNumberstringrequiredExampleDescriptionDefault4211110000000019Pattern^[0-9]{16}$
- pinstringrequiredExampleDescriptionDefault5678Pattern^[0-9]{4}$
- dateOfBirthstringrequiredExampleDescriptionDefault1985-07-19T00:00:00Pattern^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,7})?$
Responses
200
- mWalletResetPinResponse_V1Description
- durationMsintegerExampleDescriptionDefault73Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyPattern^.{1,500}$
400
- errorResponseExample
{ "durationMs": 24, "status": "Fail", "statusDescription": "The pin must be exactly 4 numeric digits.", "errorCode": "ValidationError" }Description- durationMsintegerExampleDescriptionDefault24Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultFailPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultThe pin must be exactly 4 numeric digits.Pattern^.{1,500}$
- errorCodestringExampleDescriptionDefaultValidationErrorPattern^[A-Za-z0-9_]{1,50}$
401
- errorResponseExample
{ "durationMs": 8, "status": "Unauthorized", "statusDescription": "Authentication failed. Supply a valid API key as the basic authentication username.", "errorCode": "Unauthorized" }Description- durationMsintegerExampleDescriptionDefault24Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultFailPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultThe pin must be exactly 4 numeric digits.Pattern^.{1,500}$
- errorCodestringExampleDescriptionDefaultValidationErrorPattern^[A-Za-z0-9_]{1,50}$
500
- errorResponseExample
{ "durationMs": 1503, "status": "Exception", "statusDescription": "An unexpected error occurred while processing the request.", "errorCode": "InternalServerError" }Description- durationMsintegerExampleDescriptionDefault24Pattern^[0-9]{1,7}$
- statusstringExampleDescriptionDefaultFailPattern^[A-Za-z]{2,30}$
- statusDescriptionstringExampleDescriptionDefaultThe pin must be exactly 4 numeric digits.Pattern^.{1,500}$
- errorCodestringExampleDescriptionDefaultValidationErrorPattern^[A-Za-z0-9_]{1,50}$
curl
curl --request POST \
--url https://api.mpay.com.au/mWallet/v1/resetPin \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"accountNumber": "4211110000000019",
"pin": "5678",
"dateOfBirth": "1985-07-19T00:00:00"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"accountNumber": "4211110000000019",
"pin": "5678",
"dateOfBirth": "1985-07-19T00:00:00"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/mWallet/v1/resetPin", 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/mWallet/v1/resetPin")
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({
"accountNumber": "4211110000000019",
"pin": "5678",
"dateOfBirth": "1985-07-19T00:00:00"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.mpay.com.au/mWallet/v1/resetPin"
payload = json.dumps({
"accountNumber": "4211110000000019",
"pin": "5678",
"dateOfBirth": "1985-07-19T00:00:00"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful validation. The PIN was reset.
{
"durationMs": 73,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad request. The request failed validation - for example a mandatory field is missing, a value does not match the documented pattern, or the mWallet could not be found.
{
"durationMs": 24,
"status": "Fail",
"statusDescription": "The pin must be exactly 4 numeric digits.",
"errorCode": "ValidationError"
}401
// Unauthorized. The basic authentication credentials are missing, malformed or the supplied API key is not valid for this operation.
{
"durationMs": 24,
"status": "Fail",
"statusDescription": "The pin must be exactly 4 numeric digits.",
"errorCode": "ValidationError"
}500
// Internal server error. An unexpected condition prevented the Platform from completing the request. Retry the request and contact Monoova support if the error persists.
{
"durationMs": 24,
"status": "Fail",
"statusDescription": "The pin must be exactly 4 numeric digits.",
"errorCode": "ValidationError"
}