Virtual Accounts

Virtual Accounts

Virtual accounts help track payments using unique account numbers and reduce manual reconciliation.

Download Virtual Accounts OpenAPI Document

Attribute

virtual_account_id
string
The unique identifier of the virtual account.
account_number
string
Generated virtual account number.
ifsc_code
string
IFSC of the virtual account.
beneficiary_name
string
Beneficiary name mapped to the virtual account.
description
string
Description provided while creating the virtual account.
customer_id
string
Customer ID associated with the virtual account.
minimum_amount
double
Minimum amount accepted per payment.
maximum_amount
double
Maximum amount accepted per payment.
amount_paid
double
Total amount received.
reference_number
string
Reference number provided for the virtual account.
status
string
Status of the virtual account. It can be active or closed.
expires_at
string
Expiry date of the virtual account (YYYY-MM-DD).
created_time
long
The timestamp (epoch milliseconds) when the virtual account was created.
last_modified_time
long
The timestamp (epoch milliseconds) of the latest update.

Example

{ "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

description
string
(Required)
Description of the virtual account.
customer_id
string
Customer ID associated with the virtual account.
minimum_amount
double
Minimum amount allowed per payment.
maximum_amount
double
Maximum amount allowed per payment.
expires_at
string
Virtual account expiry date (YYYY-MM-DD).
reference_number
string
Reference number for the virtual account.

Query Parameters

account_id
long
(Required)
The Zoho Payments account ID.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy

Response Example

Update Virtual Account

Update the description, limits, or expiry of a virtual account.
OAuth Scope : ZohoPay.payments.UPDATE

Arguments

description
string
Description of the virtual account.
minimum_amount
double
Minimum amount allowed per payment.
maximum_amount
double
Maximum amount allowed per payment.
expires_at
string
Virtual account expiry date (YYYY-MM-DD).
reference_number
string
Reference number for the virtual account.

Path Parameters

virtual_account_id
string
(Required)
A unique identifier of the virtual account.

Query Parameters

account_id
long
(Required)
The Zoho Payments account ID.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy

Response Example

Retrieve Virtual Account

Retrieve the details of a virtual account using its ID.
OAuth Scope : ZohoPay.payments.READ

Path Parameters

virtual_account_id
string
(Required)
A unique identifier of the virtual account.

Query Parameters

account_id
long
(Required)
The Zoho Payments account ID.

Request Example

Click to copy
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'

Response Example

List Virtual Account Payments

List payments received for a virtual account with optional filtering, sorting, and pagination.
OAuth Scope : ZohoPay.payments.READ

Path Parameters

virtual_account_id
string
(Required)
A unique identifier of the virtual account.

Query Parameters

account_id
long
(Required)
The Zoho Payments account ID.
status
string
Status can be: Status.All
per_page
integer
Indicates the number of payments to list per page. The default value is 25 per page, and the maximum limit is 200.
page
integer
Indicates the page number of the payments list. (e.g., 1 )
sort_column
string
Column to sort results by (e.g. date).
sort_order
string
Sort order - A for ascending, D for descending.

Request Example

Click to copy
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'

Response Example

Close Virtual Account

Close a virtual account to stop accepting payments.
OAuth Scope : ZohoPay.payments.UPDATE

Path Parameters

virtual_account_id
string
(Required)
A unique identifier of the virtual account.

Query Parameters

account_id
long
(Required)
The Zoho Payments account ID.

Request Example

Click to copy
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'

Response Example