Bank
It is a query service used by the merchant to dynamically retrieve the bank and bank account list that are integrated to the Cash Payments and Bank Transfer Service of Payguru. The service doesn't require any merchant authentication.
Get All
>URL
https://api.payguru.com/phs/bank/getAll
>HTTP Method
GET
>Success
Field | Type | Description |
---|
status | String | Status Code: 000 |
message | String | Message |
banks | Array[] | Banks Data |
-id | String | ID |
-code | String | Code |
-name | String | Bank ID |
-company_name | String | Bank Code |
-branch_no | String | Bank Name |
-account_no | String | Merchant ID |
-account_iban | String | Merchant Name |
-update_time | String | Service ID |
-currency | String | Service Name |
-logo | String | Service Code |
-bank_no | String | Transaction ID |
>Error
Field | Type | Description |
---|
status | String | Status Code: #See |
message | String | Message |
>Response Examples
{
"status": "000",
"message": "Success",
"banks": [
{
"id": 5,
"code": "akbank",
"name": "Akbank",
"company_name": "Trend Ödeme Kuruluşu A.Ş",
"branch_no": 645,
"account_no": 196204,
"account_iban": "TR660004600645888000196204",
"update_time": "2018-01-17 10:44:08+03",
"currency": "TL",
"logo": "https://cp.payguru.com/phs/assets/img/bank/akbank.png",
"bank_no": 46
},
{
"id": 6,
"code": "garanti",
"name": "Garanti",
"company_name": "Trend Ödeme Kuruluşu A.Ş",
"branch_no": 132,
"account_no": 6298399,
"account_iban": "TR360006200013200006298399",
"update_time": "2018-01-17 12:27:07+03",
"currency": "TL",
"logo": "https://cp.payguru.com/phs/assets/img/bank/garanti.png",
"bank_no": 62
},
]
}
{
"status": "ERR_002",
"message": "IP Not Allow"
}
>Sample Codes
curl -X GET https://api.payguru.com/phs/bank/getAll
<?php
$curl = curl_init();
$url = "https://api.payguru.com/phs/bank/getAll";
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
$o = json_decode($response,true);
if($o["status"] == "000"){
echo $o["code"];
}else{
echo count($o["banks"]);
}
}
var client = new RestClient("https://api.payguru.com/phs/bank/getAll");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
var o = JObject.Parse(response);
if (o["status"] == "000") {
MessageBox.Show((string)o["message"]);
} else {
MessageBox.Show((string)o["message"]);
}
import requests,json
url = "https://api.payguru.com/phs/bank/getAll"
response = requests.request("GET", url)
if response.status_code == 200:
o = json.loads(response.text)
if o["status"] == "000":
print o["message"]
else:
print o["message"]
else:
print "Request Error"