Validate a BPAY Transaction
GET
https://api.mpay.com.au/bpay/v1/validate/{billerCode}
Path Parameters
- billerCodestringrequiredExampleDescriptionDefault123456Pattern^[0-9]+$
Query Parameters
- customerReferencestringExampleDescriptionDefault987654321Pattern^[0-9]+$
- amountstringExampleDescriptionDefault100.00Pattern^[0-9]{1,10}(\.[0-9]{1,2})?$
Responses
200
- validateBPAYResponse_V1
- validationbPayValidationDescription
- billerCodestringExampleDescriptionDefault123456Pattern^[0-9]+$
- customerReferenceNumberstringExampleDescriptionDefault987654321Pattern^[0-9]+$
- amountstringExampleDescriptionDefault100.00Pattern^[0-9]{1,10}(\.[0-9]{1,2})?$
- billerNamestringExampleDescriptionDefaultExample Biller Pty LtdPattern^.+$
- minimumPaymentAmountnumberExampleDescriptionDefault1Pattern^[0-9]+(\.[0-9]{1,2})?$
- maximumPaymentAmountnumberExampleDescriptionDefault9999999999.99Pattern^[0-9]+(\.[0-9]{1,2})?$
- isVariableCrnbooleanExampleDescriptionDefaulttruePattern^(true|false)$
- durationMsintegerExampleDescriptionDefault42Pattern^[0-9]+$
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]+$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyPattern^.+$
400
- errorResponse_V1Description
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]+$
- statusDescriptionstringExampleDescriptionDefaultThe request could not be processed.Pattern^.+$
- durationMsintegerExampleDescriptionDefault42Pattern^[0-9]+$
401
- errorResponse_V1Description
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]+$
- statusDescriptionstringExampleDescriptionDefaultThe request could not be processed.Pattern^.+$
- durationMsintegerExampleDescriptionDefault42Pattern^[0-9]+$
500
- errorResponse_V1Description
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]+$
- statusDescriptionstringExampleDescriptionDefaultThe request could not be processed.Pattern^.+$
- durationMsintegerExampleDescriptionDefault42Pattern^[0-9]+$
curl
curl --request GET \
--url 'https://api.mpay.com.au/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00' \
--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/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00", 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/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00")
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/bpay/v1/validate/{billerCode}?customerReference=987654321&amount=100.00"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Successful response. The supplied BPAY details were validated.
{
"validation": {
"billerCode": "123456",
"customerReferenceNumber": "987654321",
"amount": "100.00",
"billerName": "Example Biller Pty Ltd",
"minimumPaymentAmount": 1,
"maximumPaymentAmount": 9999999999.99,
"isVariableCrn": true
},
"durationMs": 42,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad Request. The request was malformed or contained invalid parameters.
{
"status": "Error",
"statusDescription": "The request could not be processed.",
"durationMs": 42
}401
// Unauthorized. Authentication failed because the API key was missing or invalid.
{
"status": "Error",
"statusDescription": "The request could not be processed.",
"durationMs": 42
}500
// Internal Server Error. An unexpected error occurred while processing the request.
{
"status": "Error",
"statusDescription": "The request could not be processed.",
"durationMs": 42
}