Get all successful transactions for a date
GET
https://api.mpay.com.au/reports/v1/statement/{date}
Path Parameters
- datestringrequiredExampleDescriptionDefault2016-03-01Pattern^\d{4}-\d{2}-\d{2}$
Responses
200
- genericPaymentStatementResponse_V1Example
{ "durationMs": 20, "status": "Ok", "statusDescription": "Operation completed successfully", "transactions": [ { "uniqueReferenced": "43257", "transactionId": 36, "dateTime": "2018-09-01T19:19:38", "status": "OK", "totalAmount": 25, "feeAmountExcludingGst": 0.335, "feeAmountGstComponent": 0.0335, "feeAmountIncludingGst": 0.3685 } ] }Description- transactionsgenericPaymentStatementClass[]Description
- uniqueReferencedstringExampleDescriptionDefault43257Pattern^[A-Za-z0-9\-_]{1,50}$
- transactionIdinteger<int64>ExampleDescriptionDefault36Formatint64Pattern^\d{1,18}$
- dateTimestringExampleDescriptionDefault2018-09-01T19:19:38Pattern^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$
- statusstringExampleDescriptionDefaultOKPattern^[A-Za-z]{2,50}$
- totalAmountnumber<double>ExampleDescriptionDefault25FormatdoublePattern^-?\d{1,13}(\.\d{1,2})?$
- feeAmountExcludingGstnumber<double>ExampleDescriptionDefault0.335FormatdoublePattern^-?\d{1,13}(\.\d{1,4})?$
- feeAmountGstComponentnumber<double>ExampleDescriptionDefault0.0335FormatdoublePattern^-?\d{1,13}(\.\d{1,4})?$
- feeAmountIncludingGstnumber<double>ExampleDescriptionDefault0.3685FormatdoublePattern^-?\d{1,13}(\.\d{1,4})?$
- durationMsinteger<int64>ExampleDescriptionDefault20Formatint64Pattern^\d{1,10}$
- statusstringExampleDescriptionDefaultOkPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyPattern^.{1,500}$
400
- badRequestResponse_V1Example
{ "durationMs": 4, "status": "Error", "statusDescription": "The date supplied is invalid. Provide the date in ISO 8601 format, for example 2016-03-01." }Description- durationMsinteger<int64>ExampleDescriptionDefault4Formatint64Pattern^\d{1,10}$
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultThe date supplied is invalid. Provide the date in ISO 8601 format, for example 2016-03-01.Pattern^.{1,500}$
401
- unauthorisedResponse_V1Example
{ "durationMs": 2, "status": "Unauthorized", "statusDescription": "Authentication failed. Supply a valid API key as the basic authentication username." }Description- durationMsinteger<int64>ExampleDescriptionDefault2Formatint64Pattern^\d{1,10}$
- statusstringExampleDescriptionDefaultUnauthorizedPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultAuthentication failed. Supply a valid API key as the basic authentication username.Pattern^.{1,500}$
500
- internalServerErrorResponse_V1Example
{ "durationMs": 118, "status": "Error", "statusDescription": "An unexpected error occurred while processing the request. Please try again later." }Description- durationMsinteger<int64>ExampleDescriptionDefault118Formatint64Pattern^\d{1,10}$
- statusstringExampleDescriptionDefaultErrorPattern^[A-Za-z]{2,50}$
- statusDescriptionstringExampleDescriptionDefaultAn unexpected error occurred while processing the request. Please try again later.Pattern^.{1,500}$
curl
curl --request GET \
--url https://api.mpay.com.au/reports/v1/statement/{date} \
--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/reports/v1/statement/{date}", 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/reports/v1/statement/{date}")
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/reports/v1/statement/{date}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Successful validation. The statement report was generated.
{
"transactions": [
{
"uniqueReferenced": "43257",
"transactionId": 36,
"dateTime": "2018-09-01T19:19:38",
"status": "OK",
"totalAmount": 25,
"feeAmountExcludingGst": 0.335,
"feeAmountGstComponent": 0.0335,
"feeAmountIncludingGst": 0.3685
}
],
"durationMs": 20,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad request. The date supplied is missing or is not a valid ISO 8601 date.
{
"durationMs": 4,
"status": "Error",
"statusDescription": "The date supplied is invalid. Provide the date in ISO 8601 format, for example 2016-03-01."
}401
// Unauthorised. The API key is missing, invalid or has been revoked.
{
"durationMs": 2,
"status": "Unauthorized",
"statusDescription": "Authentication failed. Supply a valid API key as the basic authentication username."
}500
// Internal server error. The request could not be completed by the Platform.
{
"durationMs": 118,
"status": "Error",
"statusDescription": "An unexpected error occurred while processing the request. Please try again later."
}