Validate Account Details via NPP
code examples curl request post \\ \ url https //api mpay com au/verify/v1/aba/nppvalidate \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data raw '{ "creditmethod" "nppcreditbankaccount", "bsb" "032 001", "bankaccountnumber" "123456789", "accountname" "acme pty ltd", "payid" "accounts\@acme com au", "payidtype" "email", "remitter" "acme pty ltd", "lodgementreference" "acct verify 4821", "verificationidentifier" "supplier onboard 4821" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "creditmethod" "nppcreditbankaccount", "bsb" "032 001", "bankaccountnumber" "123456789", "accountname" "acme pty ltd", "payid" "accounts\@acme com au", "payidtype" "email", "remitter" "acme pty ltd", "lodgementreference" "acct verify 4821", "verificationidentifier" "supplier onboard 4821" }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api mpay com au/verify/v1/aba/nppvalidate", 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/verify/v1/aba/nppvalidate") 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({ "creditmethod" "nppcreditbankaccount", "bsb" "032 001", "bankaccountnumber" "123456789", "accountname" "acme pty ltd", "payid" "accounts\@acme com au", "payidtype" "email", "remitter" "acme pty ltd", "lodgementreference" "acct verify 4821", "verificationidentifier" "supplier onboard 4821" }) response = https request(request) puts response read body import requests import json url = "https //api mpay com au/verify/v1/aba/nppvalidate" payload = json dumps({ "creditmethod" "nppcreditbankaccount", "bsb" "032 001", "bankaccountnumber" "123456789", "accountname" "acme pty ltd", "payid" "accounts\@acme com au", "payidtype" "email", "remitter" "acme pty ltd", "lodgementreference" "acct verify 4821", "verificationidentifier" "supplier onboard 4821" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // success the account details were validated successfully { "feeamountexgst" 0 3, "feeamountincgst" 0 33, "feeamountgstcomp" 0 03, "ownername" "acme pty ltd", "durationms" 96, "status" "ok", "statusdescription" "operation completed successfully" }// bad request the request could not be processed because one or more fields are missing, malformed, or failed validation check statusdescription for the specific field or rule that failed { "durationms" 12, "status" "error", "statusdescription" "validation failed 'bsb' must be in the format '000 000' " }// unauthorized the api key was missing, malformed, or is not valid for this environment pass your api key as the basic authentication username with no password { "durationms" 12, "status" "error", "statusdescription" "validation failed 'bsb' must be in the format '000 000' " }// internal server error an unexpected error occurred while processing the request the request was not completed and can be safely retried { "durationms" 12, "status" "error", "statusdescription" "validation failed 'bsb' must be in the format '000 000' " }