production
development
https://apigateway.bankalfalah.com/bankalfalah/sb
Paths
/TitleFetch
post /TitleFetch
ClientSecret
X-IBM-Client-Secret
(apiKey located in header)
ClientID
X-IBM-Client-Id
(apiKey located in header)
RequestData
Required in body
object
{ "referenceNo": "PC128078165055930", "nbrAccount": "04451008104327", "sendAmount": { "amount": "0", "currency": "PKR" }, "bankCode": "627618", "isIBAN": "N" }
Content-Type
Optional in header
string
application/json
Accept
Optional in header
string
application/json
200
200 OK Successful operation.
Example Request
curl --request POST \
--url https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-ibm-client-id: REPLACE_THIS_KEY' \
--header 'x-ibm-client-secret: REPLACE_THIS_KEY' \
--data '{"referenceNo":"PC128078165055930","nbrAccount":"PK12ABCD7891234657891234","sendAmount":{"amount":"0","currency":"PKR"},"bankCode":"627618","isIBAN":"Y"}'
require 'uri'
require 'openssl'
require 'net/http'
url = URI("https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
request = Net::HTTP::Post.new(url)
request["x-ibm-client-id"] = 'REPLACE_THIS_KEY'
request["x-ibm-client-secret"] = 'REPLACE_THIS_KEY'
request["content-type"] = 'application/json'
request["accept"] = 'application/json'
request.body = "{\"referenceNo\":\"PC128078165055930\",\"nbrAccount\":\"PK12ABCD7891234657891234\",\"sendAmount\":{\"amount\":\"0\",\"currency\":\"PKR\"},\"bankCode\":\"627618\",\"isIBAN\":\"Y\"}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("apigateway.bankalfalah.com")
payload = "{\"referenceNo\":\"PC128078165055930\",\"nbrAccount\":\"PK12ABCD7891234657891234\",\"sendAmount\":{\"amount\":\"0\",\"currency\":\"PKR\"},\"bankCode\":\"627618\",\"isIBAN\":\"Y\"}"
headers = {
'x-ibm-client-id': "REPLACE_THIS_KEY",
'x-ibm-client-secret': "REPLACE_THIS_KEY",
'content-type': "application/json",
'accept': "application/json"
}
conn.request("POST", "/bankalfalah/sb/title-fetch/TitleFetch", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"referenceNo\":\"PC128078165055930\",\"nbrAccount\":\"PK12ABCD7891234657891234\",\"sendAmount\":{\"amount\":\"0\",\"currency\":\"PKR\"},\"bankCode\":\"627618\",\"isIBAN\":\"Y\"}",
CURLOPT_HTTPHEADER => array(
"accept: application/json",
"content-type: application/json",
"x-ibm-client-id: REPLACE_THIS_KEY",
"x-ibm-client-secret: REPLACE_THIS_KEY"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
// OkHttpClient from http://square.github.io/okhttp/
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"referenceNo\":\"PC128078165055930\",\"nbrAccount\":\"PK12ABCD7891234657891234\",\"sendAmount\":{\"amount\":\"0\",\"currency\":\"PKR\"},\"bankCode\":\"627618\",\"isIBAN\":\"Y\"}");
Request request = new Request.Builder()
.url("https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch")
.post(body)
.addHeader("x-ibm-client-id", "REPLACE_THIS_KEY")
.addHeader("x-ibm-client-secret", "REPLACE_THIS_KEY")
.addHeader("content-type", "application/json")
.addHeader("accept", "application/json")
.build();
Response response = client.newCall(request).execute();
// Install request by running "npm install --save request"
var request = require("request");
var options = { method: 'POST',
url: 'https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch',
headers:
{ accept: 'application/json',
'content-type': 'application/json',
'x-ibm-client-secret': 'REPLACE_THIS_KEY',
'x-ibm-client-id': 'REPLACE_THIS_KEY' },
body:
{ referenceNo: 'PC128078165055930',
nbrAccount: 'PK12ABCD7891234657891234',
sendAmount: { amount: '0', currency: 'PKR' },
bankCode: '627618',
isIBAN: 'Y' },
json: true };
request(options, function (error, response, body) {
if (error) return console.error('Failed: %s', error.message);
console.log('Success: ', body);
});
import Foundation
let headers = [
"x-ibm-client-id": "REPLACE_THIS_KEY",
"x-ibm-client-secret": "REPLACE_THIS_KEY",
"content-type": "application/json",
"accept": "application/json"
]
let parameters = [
"referenceNo": "PC128078165055930",
"nbrAccount": "PK12ABCD7891234657891234",
"sendAmount": [
"amount": "0",
"currency": "PKR"
],
"bankCode": "627618",
"isIBAN": "Y"
]
let postData = NSJSONSerialization.dataWithJSONObject(parameters, options: nil, error: nil)
var request = NSMutableURLRequest(URL: NSURL(string: "https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch")!,
cachePolicy: .UseProtocolCachePolicy,
timeoutInterval: 10.0)
request.HTTPMethod = "POST"
request.allHTTPHeaderFields = headers
request.HTTPBody = postData
let session = NSURLSession.sharedSession()
let dataTask = session.dataTaskWithRequest(request, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? NSHTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: application/json");
headers = curl_slist_append(headers, "content-type: application/json");
headers = curl_slist_append(headers, "x-ibm-client-secret: REPLACE_THIS_KEY");
headers = curl_slist_append(headers, "x-ibm-client-id: REPLACE_THIS_KEY");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"referenceNo\":\"PC128078165055930\",\"nbrAccount\":\"PK12ABCD7891234657891234\",\"sendAmount\":{\"amount\":\"0\",\"currency\":\"PKR\"},\"bankCode\":\"627618\",\"isIBAN\":\"Y\"}");
CURLcode ret = curl_easy_perform(hnd);
var client = new RestClient("https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch");
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddHeader("x-ibm-client-secret", "REPLACE_THIS_KEY");
request.AddHeader("x-ibm-client-id", "REPLACE_THIS_KEY");
request.AddParameter("application/json", "{\"referenceNo\":\"PC128078165055930\",\"nbrAccount\":\"PK12ABCD7891234657891234\",\"sendAmount\":{\"amount\":\"0\",\"currency\":\"PKR\"},\"bankCode\":\"627618\",\"isIBAN\":\"Y\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Example Response
POST https://apigateway.bankalfalah.com/bankalfalah/sb/title-fetch/TitleFetch
{
"responseCode": "000",
"authIdResponse": "",
"transactionLogId": "545346865",
"accountTitle": "TEST ACCOUNT ",
"toAccountNumber": "0445100810**** ",
"beneficiaryIBAN": " ",
"beneficiaryBank": " ",
"beneficiaryBranch": " "
}
Try this operation
No response. This is a mixed content call. It is not possible to test HTTP APIs from an HTTPS secured Portal site and vice versa.
No response. This is a cross-origin call. Make sure the server accepts requests from this portal. Or if using self-signed SSL certificates then paste the URL above into your browser to accept the certificate before trying again (On Internet Explorer it must be the same browser tab.).
Definitions
{
"type": "object",
"properties": {
"referenceNo": {
"type": "string"
},
"nbrAccount": {
"type": "string"
},
"sendAmount": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"currency": {
"type": "string"
}
}
},
"bankCode": {
"type": "string"
},
"isIBAN": {
"type": "string"
}
},
"example": {
"referenceNo": "PC128078165055930",
"nbrAccount": "PK12ABCD7891234657891234",
"sendAmount": {
"amount": "0",
"currency": "PKR"
},
"bankCode": "627618",
"isIBAN": "Y"
}
}
{
"type": "object",
"properties": {
"responseCode": {
"type": "string"
},
"authIdResponse": {
"type": "string"
},
"transactionLogId": {
"type": "string"
},
"accountTitle": {
"type": "string"
},
"toAccountNumber": {
"type": "string"
},
"beneficiaryIBAN": {
"type": "string"
},
"beneficiaryBank": {
"type": "string"
},
"beneficiaryBranch": {
"type": "string"
}
},
"example": {
"responseCode": "000",
"authIdResponse": "",
"transactionLogId": "545346865",
"accountTitle": "TEST ACCOUNT ",
"toAccountNumber": "0445100810**** ",
"beneficiaryIBAN": " ",
"beneficiaryBank": " ",
"beneficiaryBranch": " "
}
}