Fetch Virtual Account
curl --request GET \
--url https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number} \
--header 'Authorization: <authorization>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}"
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', Authorization: '<authorization>'}
};
fetch('https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}', 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://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 349,
"timestamp": 1,
"data": {
"@entity": "org.quicko.bank.virtual.bank_account",
"account_number": "<string>",
"ifsc": "<string>",
"bank_name": "<string>",
"created_at": 1,
"notes": {},
"external_id": "<string>",
"name": "<string>"
},
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": 349,
"timestamp": 1,
"message": "<string>",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Fetch Virtual Account
Fetch Virtual Account API allows you to get the virtual account by providing account number
GET
/
bank
/
virtual
/
accounts
/
{account_number}
Fetch Virtual Account
curl --request GET \
--url https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number} \
--header 'Authorization: <authorization>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}"
headers = {
"x-api-key": "<x-api-key>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', Authorization: '<authorization>'}
};
fetch('https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}', 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://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-api-key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}")
.header("x-api-key", "<x-api-key>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api.sandbox.co.in/bank/virtual/accounts/{account_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"code": 349,
"timestamp": 1,
"data": {
"@entity": "org.quicko.bank.virtual.bank_account",
"account_number": "<string>",
"ifsc": "<string>",
"bank_name": "<string>",
"created_at": 1,
"notes": {},
"external_id": "<string>",
"name": "<string>"
},
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": 349,
"timestamp": 1,
"message": "<string>",
"transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Was this page helpful?
⌘I