Bank Lookup (VND only)
Lookup via QR Content
Accepts VietQR (EMV Co) QR content.
This API allows you to retrieve bank account details from QR content. To do so, you need to provide the qr_content in the request body.
When the QR content is valid, the API returns account_name, account_number, bank_name and swift_code.
POST
/
v2
/
banks
/
lookup
/
qr_content
Lookup via QR Content
curl --request POST \
--url https://api.cleverhub.co/api/v2/banks/lookup/qr_content \
--header 'Content-Type: application/json' \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>' \
--data '
{
"qr_content": "00020101021138590010A0000007270129......"
}
'import requests
url = "https://api.cleverhub.co/api/v2/banks/lookup/qr_content"
payload = { "qr_content": "00020101021138590010A0000007270129......" }
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'app-id': '<api-key>',
'secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({qr_content: '00020101021138590010A0000007270129......'})
};
fetch('https://api.cleverhub.co/api/v2/banks/lookup/qr_content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleverhub.co/api/v2/banks/lookup/qr_content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'qr_content' => '00020101021138590010A0000007270129......'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/banks/lookup/qr_content"
payload := strings.NewReader("{\n \"qr_content\": \"00020101021138590010A0000007270129......\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cleverhub.co/api/v2/banks/lookup/qr_content")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"qr_content\": \"00020101021138590010A0000007270129......\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/banks/lookup/qr_content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"qr_content\": \"00020101021138590010A0000007270129......\"\n}"
response = http.request(request)
puts response.read_body{
"account_name": "NGO TIEN PHONG",
"account_number": "1234567899",
"bank_name": "Ngân hàng TMCP Đầu tư và Phát triển Việt Nam",
"swift_code": "BIDVVNVX"
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}{
"errors": {
"message": "Not found"
}
}Authorizations
A unique identifier assigned to each application.
A secure token associated with the app-id.
Body
application/json
Content of the QR code
⌘I
Lookup via QR Content
curl --request POST \
--url https://api.cleverhub.co/api/v2/banks/lookup/qr_content \
--header 'Content-Type: application/json' \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>' \
--data '
{
"qr_content": "00020101021138590010A0000007270129......"
}
'import requests
url = "https://api.cleverhub.co/api/v2/banks/lookup/qr_content"
payload = { "qr_content": "00020101021138590010A0000007270129......" }
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'app-id': '<api-key>',
'secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({qr_content: '00020101021138590010A0000007270129......'})
};
fetch('https://api.cleverhub.co/api/v2/banks/lookup/qr_content', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleverhub.co/api/v2/banks/lookup/qr_content",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'qr_content' => '00020101021138590010A0000007270129......'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/banks/lookup/qr_content"
payload := strings.NewReader("{\n \"qr_content\": \"00020101021138590010A0000007270129......\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cleverhub.co/api/v2/banks/lookup/qr_content")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"qr_content\": \"00020101021138590010A0000007270129......\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/banks/lookup/qr_content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"qr_content\": \"00020101021138590010A0000007270129......\"\n}"
response = http.request(request)
puts response.read_body{
"account_name": "NGO TIEN PHONG",
"account_number": "1234567899",
"bank_name": "Ngân hàng TMCP Đầu tư và Phát triển Việt Nam",
"swift_code": "BIDVVNVX"
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}{
"errors": {
"message": "Not found"
}
}