Virtual Accounts
Virtual accounts help track payments using unique account numbers and reduce manual reconciliation.
Attribute
active or closed.{
"virtual_account_id": "1987000007005239",
"account_number": "ZOHOESAAAD5QKQ2FAKW",
"ifsc_code": "ICIC0000106",
"beneficiary_name": "Zoho Payments",
"description": "Description for ORDER#123",
"customer_id": "1987000007005031",
"minimum_amount": 100,
"maximum_amount": 10000,
"amount_paid": 0,
"reference_number": "zxjnijnwdjf",
"status": "active",
"expires_at": "2026-10-25",
"created_time": 1761573181,
"last_modified_time": 1761573181
}
Create Virtual Account
Create a new virtual account to collect payments via bank transfer.
OAuth Scope : ZohoPay.payments.CREATE
Arguments
Query Parameters
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.post("https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556")
.header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.header("content-type", "application/json")
.body("{\"field1\":\"value1\",\"field2\":\"value2\"}")
.asString();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
const settings = {
"async": true,
"crossDomain": true,
"url": "https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556",
"method": "POST",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
},
"processData": false,
"data": "{\"field1\":\"value1\",\"field2\":\"value2\"}"
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import http.client
conn = http.client.HTTPSConnection("payments.zoho.in")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v1/virtualaccounts?account_id=23137556", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "payments.zoho.in",
"port": null,
"path": "/api/v1/virtualaccounts?account_id=23137556",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const unirest = require("unirest");
const req = unirest("POST", "https://payments.zoho.in/api/v1/virtualaccounts");
req.query({
"account_id": "23137556"
});
req.headers({
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
});
req.type("json");
req.send({
"field1": "value1",
"field2": "value2"
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://payments.zoho.in/api/v1/virtualaccounts',
qs: {account_id: '23137556'},
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: {field1: 'value1', field2: 'value2'},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
request["content-type"] = 'application/json'
request.body = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
response = http.request(request)
puts response.read_body
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"field1\":\"value1\",\"field2\":\"value2\"}",
CURLOPT_HTTPHEADER => [
"Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
<?php
$request = new HttpRequest();
$request->setUrl('https://payments.zoho.in/api/v1/virtualaccounts');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'account_id' => '23137556'
]);
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type' => 'application/json'
]);
$request->setBody('{"field1":"value1","field2":"value2"}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"field1":"value1","field2":"value2"}');
$request->setRequestUrl('https://payments.zoho.in/api/v1/virtualaccounts');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'account_id' => '23137556'
]));
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
var client = new RestClient("https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556"),
Headers =
{
{ "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556"
payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"field1": "value1",
"field2": "value2"
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556");
xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request POST \
--url 'https://payments.zoho.in/api/v1/virtualaccounts?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"description": "Description for ORDER#123",
"customer_id": "1987000007005031",
"minimum_amount": 100,
"maximum_amount": 10000,
"expires_at": "2026-10-25",
"reference_number": "zxjnijnwdjf"
}
{
"code": 0,
"message": "Virtual Account Created",
"virtual_account": {
"virtual_account_id": "1987000007005239",
"account_number": "ZOHOESAAAD5QKQ2FAKW",
"ifsc_code": "ICIC0000106",
"beneficiary_name": "Zoho Payments",
"description": "Description for ORDER#123",
"customer_id": "1987000007005031",
"minimum_amount": 100,
"maximum_amount": 10000,
"amount_paid": 0,
"amount_paid_formatted": "₹0.00",
"reference_number": "zxjnijnwdjf",
"status": "active",
"status_formatted": "Active",
"expires_at": "2026-10-25",
"expires_at_formatted": "Oct 25, 2026, 11:59 PM",
"created_time": 1761573181,
"created_time_formatted": "Oct 27, 2025, 07:23 PM",
"last_modified_time": 1761573181,
"last_modified_time_formatted": "Oct 27, 2025, 07:23 PM"
}
}
Update Virtual Account
Update the description, limits, or expiry of a virtual account.
OAuth Scope : ZohoPay.payments.UPDATE
Arguments
Path Parameters
Query Parameters
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.put("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556")
.header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.header("content-type", "application/json")
.body("{\"field1\":\"value1\",\"field2\":\"value2\"}")
.asString();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
const settings = {
"async": true,
"crossDomain": true,
"url": "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556",
"method": "PUT",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
},
"processData": false,
"data": "{\"field1\":\"value1\",\"field2\":\"value2\"}"
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import http.client
conn = http.client.HTTPSConnection("payments.zoho.in")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/api/v1/virtualaccounts/1987000007005239?account_id=23137556", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "payments.zoho.in",
"port": null,
"path": "/api/v1/virtualaccounts/1987000007005239?account_id=23137556",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const unirest = require("unirest");
const req = unirest("PUT", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239");
req.query({
"account_id": "23137556"
});
req.headers({
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
});
req.type("json");
req.send({
"field1": "value1",
"field2": "value2"
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const request = require('request');
const options = {
method: 'PUT',
url: 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239',
qs: {account_id: '23137556'},
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: {field1: 'value1', field2: 'value2'},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
request["content-type"] = 'application/json'
request.body = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
response = http.request(request)
puts response.read_body
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"field1\":\"value1\",\"field2\":\"value2\"}",
CURLOPT_HTTPHEADER => [
"Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
<?php
$request = new HttpRequest();
$request->setUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'account_id' => '23137556'
]);
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type' => 'application/json'
]);
$request->setBody('{"field1":"value1","field2":"value2"}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"field1":"value1","field2":"value2"}');
$request->setRequestUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'account_id' => '23137556'
]));
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
var client = new RestClient("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556"),
Headers =
{
{ "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556"
payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"field1": "value1",
"field2": "value2"
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PUT", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556");
xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request PUT \
--url 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"description": "Testing virtual account update",
"minimum_amount": 10,
"maximum_amount": 900,
"expires_at": "2026-07-12",
"reference_number": "zx00jnwdjf"
}
{
"code": 0,
"message": "Virtual Account Updated",
"virtual_account": {
"virtual_account_id": "1987000007018050",
"account_number": "ZOHOESAAAD5QKQ2F5WK",
"ifsc_code": "ICIC0000106",
"beneficiary_name": "Zoho Payments",
"description": "Testing virtual account update",
"customer_id": "1987000007005031",
"minimum_amount": 10,
"maximum_amount": 900,
"amount_paid": "0.00",
"amount_paid_formatted": "₹0.00",
"reference_number": "zx00jnwdjf",
"status": "active",
"status_formatted": "Active",
"expires_at": "2026-07-12",
"expires_at_formatted": "Jul 12, 2026, 11:59 PM",
"created_time": 1761721538,
"created_time_formatted": "Oct 29, 2025, 12:35 PM",
"last_modified_time": 1761721540,
"last_modified_time_formatted": "Oct 29, 2025, 12:35 PM"
}
}
Retrieve Virtual Account
Retrieve the details of a virtual account using its ID.
OAuth Scope : ZohoPay.payments.READ
Path Parameters
Query Parameters
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.get("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556")
.header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.asString();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
const settings = {
"async": true,
"crossDomain": true,
"url": "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556",
"method": "GET",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import http.client
conn = http.client.HTTPSConnection("payments.zoho.in")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/v1/virtualaccounts/1987000007005239?account_id=23137556", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "payments.zoho.in",
"port": null,
"path": "/api/v1/virtualaccounts/1987000007005239?account_id=23137556",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const unirest = require("unirest");
const req = unirest("GET", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239");
req.query({
"account_id": "23137556"
});
req.headers({
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239',
qs: {account_id: '23137556'},
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
response = http.request(request)
puts response.read_body
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556",
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: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
<?php
$request = new HttpRequest();
$request->setUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'account_id' => '23137556'
]);
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'account_id' => '23137556'
]));
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
var client = new RestClient("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556"),
Headers =
{
{ "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556");
xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request GET \
--url 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"virtual_account": {
"virtual_account_id": "1987000007005239",
"account_number": "ZOHOESAAAD5QKQ2FAKW",
"ifsc_code": "ICIC0000106",
"beneficiary_name": "Zoho Payments",
"description": "Description for ORDER#123",
"customer_id": "1987000007005031",
"minimum_amount": 100,
"maximum_amount": 10000,
"amount_paid": 0,
"amount_paid_formatted": "₹0.00",
"reference_number": "zxjnijnwdjf",
"status": "active",
"status_formatted": "Active",
"expires_at": "2026-10-25",
"expires_at_formatted": "Oct 25, 2026, 11:59 PM",
"created_time": 1761573181,
"created_time_formatted": "Oct 27, 2025, 07:23 PM",
"last_modified_time": 1761573181,
"last_modified_time_formatted": "Oct 27, 2025, 07:23 PM"
}
}
List Virtual Account Payments
List payments received for a virtual account with optional filtering, sorting, and pagination.
OAuth Scope : ZohoPay.payments.READ
Path Parameters
Query Parameters
Status.All25 per page, and the maximum limit is 200.1 )OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.get("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556")
.header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.asString();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
const settings = {
"async": true,
"crossDomain": true,
"url": "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556",
"method": "GET",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import http.client
conn = http.client.HTTPSConnection("payments.zoho.in")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "payments.zoho.in",
"port": null,
"path": "/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const unirest = require("unirest");
const req = unirest("GET", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments");
req.query({
"account_id": "23137556"
});
req.headers({
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments',
qs: {account_id: '23137556'},
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
response = http.request(request)
puts response.read_body
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556",
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: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
<?php
$request = new HttpRequest();
$request->setUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'account_id' => '23137556'
]);
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'account_id' => '23137556'
]));
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
var client = new RestClient("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556"),
Headers =
{
{ "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556");
xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request GET \
--url 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/payments?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"payments": [
{
"payment_id": "388000002062115",
"customer_id": "",
"virtual_account_id": "388000002067001",
"customer_name": "",
"customer_email": "",
"amount": "2.01",
"amount_formatted": "₹2.01",
"receipt_email": "",
"dialing_code": "",
"phone": "",
"reference_number": "",
"transaction_reference_number": "570935464558",
"payment_type": "ecommerce",
"payment_type_formatted": "E-Commerce",
"currency": "INR",
"balance": "2.01",
"balance_formatted": "₹2.01",
"amount_captured": "2.01",
"amount_captured_formatted": "₹2.01",
"amount_refunded": "0.00",
"amount_refunded_formatted": "₹0.00",
"fee_amount": "0.02",
"fee_amount_formatted": "₹0.02",
"status": "succeeded",
"status_formatted": "Succeeded",
"transaction_type": "one_time",
"transaction_type_formatted": "One Time",
"fraud_alert": "no_alert",
"fraud_alert_formatted": "No Alert received",
"failure_reason": "",
"failure_category": "",
"failure_category_formatted": "",
"next_action": "",
"tip": "",
"date": 1765263038,
"date_formatted": "Dec 9, 2025, 12:20 PM",
"payment_method": {
"payment_method_id": "",
"type": "bank_transfer",
"type_formatted": "Bank Transfer"
}
},
{...},
{...}
]
}
Close Virtual Account
Close a virtual account to stop accepting payments.
OAuth Scope : ZohoPay.payments.UPDATE
Path Parameters
Query Parameters
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556")
.put(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
HttpResponse<String> response = Unirest.put("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556")
.header("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.asString();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
const settings = {
"async": true,
"crossDomain": true,
"url": "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556",
"method": "PUT",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
import http.client
conn = http.client.HTTPSConnection("payments.zoho.in")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("PUT", "/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "payments.zoho.in",
"port": null,
"path": "/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const unirest = require("unirest");
const req = unirest("PUT", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close");
req.query({
"account_id": "23137556"
});
req.headers({
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const request = require('request');
const options = {
method: 'PUT',
url: 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close',
qs: {account_id: '23137556'},
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
response = http.request(request)
puts response.read_body
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
<?php
$request = new HttpRequest();
$request->setUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'account_id' => '23137556'
]);
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close');
$request->setRequestMethod('PUT');
$request->setQuery(new http\QueryString([
'account_id' => '23137556'
]));
$request->setHeaders([
'Authorization' => 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
var client = new RestClient("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556"),
Headers =
{
{ "Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("PUT", "https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556");
xhr.setRequestHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
xhr.send(data);
curl --request PUT \
--url 'https://payments.zoho.in/api/v1/virtualaccounts/1987000007005239/close?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Virtual Account Closed"
}