GETFinancialInstitutions API

The GETFinancialInstitutions web service is used to obtain the list of banks available to the merchant. This web service call is optional and can be used to inform the user about the list of banks that they can use with POLi. This is useful as users can then determine if their bank is supported by POLi before selecting POLi as the payment method.

Alternatively, you could provide a real-time list of available banks to your customers. Simply add your merchant code to the end of this link and add it as a hyperlink on your site: https://transaction.apac.paywithpoli.com/POLiFISupported.aspx?merchantcode=<YOURMERCHANTCODE>

https://transaction.apac.paywithpoli.com/POLiFISupported.aspx?merchantcode=SS64XXXXXX

GETFinancialInstitutions Request

To formulate a GETFinancialInstitutions call

https://poliapi.apac.paywithpoli.com/api/Entity/GetFinancialInstitutions

GETFinancialInstitutions Response

Name Description Data Type JSON Data Type Possible Values
FinancialInstitutionCode An array of Financial Institution Codes String String Members of the Financial Institution list associated with the merchant
FinancialInstitutionName An array of Financial Institution Names String String Members of the Financial Institution list associated with the merchant
Online A boolean that shows whether the FI is currently online Boolean Boolean true\false

GETFinancialInstitutions Example

This code example show you how to call GETFinancialInstitutions

Download our API collection to generate code snippets of your preferred language

PHP

 $auth = base64_encode('SS64xxxxx:AuthCode1234'); //ADD YOUR CREDENTIALS
 $header = array();
 $header[] = 'Authorization: Basic '.$auth;

 $ch = curl_init("https://poliapi.apac.paywithpoli.com/api/Entity/GetFinancialInstitutions");
 //See the cURL documentation for more information: http://curl.haxx.se/docs/sslcerts.html
 //We recommend using this bundle: https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
 curl_setopt( $ch, CURLOPT_CAINFO, "ca-bundle.crt");
 curl_setopt( $ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
 curl_setopt( $ch, CURLOPT_HTTPHEADER, $header);
 curl_setopt( $ch, CURLOPT_HEADER, 0);
 curl_setopt( $ch, CURLOPT_POST, 0);
 curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0);
 curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
 $response = curl_exec( $ch );
 curl_close ($ch);

 $json = json_decode($response, true);

 print_r($json);

C Sharp

var auth = 
System.Convert.ToBase64String
(System.Text.Encoding.UTF8.GetBytes('SS64xxxxx:AuthCode12345')); //ADD YOUR CREDENTIALS

var myRequest = 
System.Net.WebRequest.Create
("https://poliapi.apac.paywithpoli.com/api/Entity/GetFinancialInstitutions");
myRequest.Method = "GET";
myRequest.Headers.Add("Authorization", "Basic "+auth);

var response = (System.Net.HttpWebResponse)myRequest.GetResponse();
var data = response.GetResponseStream();
var streamRead = new StreamReader(data);
Char[] readBuff = new Char[response.ContentLength];
int count = streamRead.Read(readBuff, 0, (int)response.ContentLength);
while (count > 0)
{
    var outputData = new String(readBuff, 0, count);
    Console.Write(outputData);
    count = streamRead.Read(readBuff, 0, (int)response.ContentLength);
    dynamic latest = JsonConvert.DeserializeObject(outputData);
}
response.Close();
data.Close();
streamRead.Close();

GETFinancialInstitutions Response Example

JSON

[
    {
        "Name": "ANZ",
        "Code": "ANZ",
        "Online": true
    },
    {
        "Name": "Kiwibank",
        "Code": "Kiwibank",
        "Online": true
    }
]