mAccount
Get transactions by mAccount
code examples curl location 'https //api mpay com au/maccount/v1/transactions' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{"body" {"accountnumber" "string","frequency" "string\<custom | thismonth | lastmonth | today>","descending"\ false,"usetime"\ false}}'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "body" { "accountnumber" "string", "frequency" "string\<custom | thismonth | lastmonth | today>", "descending" false, "usetime" false } }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api mpay com au/maccount/v1/transactions", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api mpay com au/maccount/v1/transactions") 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({ "body" { "accountnumber" "string", "frequency" "string\<custom | thismonth | lastmonth | today>", "descending" false, "usetime" false } }) response = https request(request) puts response read body import requests import json url = "https //api mpay com au/maccount/v1/transactions" payload = json dumps({ "body" { "accountnumber" "string", "frequency" "string\<custom | thismonth | lastmonth | today>", "descending" false, "usetime" false } }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // ok { "durationms" 20, "status" "ok", "statusdescription" "operation completed successfully", "openingbalance" "", "closingbalance" 25, "totaldebits" 25, "totalcredits" "", "items" \[ { "credit" "", "datetime" "2017 11 18t19 06 09", "debit" 25, "description" "payment unique reference e9f49db3 66a9 4448 bb36 84499c0c8f2d", "destinationmaccountcardnumber" "6279059600052340", "iswaitingforfundstoclear" false, "mpaymentsid" 2303203, "mwalletaccountnumber" "6279059600052340", "roworder" "", "runningbalance" 25, "sourcemaccountcardnumber" "6279059600052340", "subtransactiontype" "gatewaymwalletcredit", "transactiondescription" "payment to mwallet", "transactionid" 4958475, "transactiontype" "loadfunds", "uniquereference" "0bbae2f1 428a 4843 0b3e4bc" } ] }// bad request // internal server error