Payment Links
The Payment Links API enables businesses to generate payment links, allowing customers to make secure payments using their preferred payment method. Learn more about Payment Links in our developer documentation.
Attribute
yyyy-MM-dd
format. If no expiry is set, the payment link will expire in 30 days by default.(e.g.,
INR
).active
, paid
, canceled
or expired
.{
"payment_link_id": "173000002315107",
"url": "https://payments.zoho.in/paymentlink/b0ec9b455584e8ee1dc0fd479f7ad4601ea39169f8aaf9991b83",
"expires_at": "2025-03-14",
"amount": "100.50",
"amount_paid": "0.00",
"currency": "INR",
"status": "active",
"email": "xxx@abc.com",
"reference_id": "1234567890IUEGS",
"description": "Payment for Order #12345",
"return_url": "https://example.com/success",
"phone": "+91 0000000000",
"created_time": 1708950672,
"created_by_id": "173000002314885",
"created_by": "Akash",
"last_modified_by_id": "173000002314885",
"last_modified": "Akash"
}
Create Payment Link
This API endpoint allows you to create payment links in Zoho Payments. You can generate unique links that let you collect payments from customers easily.
OAuth Scope : ZohoPay.payments.CREATE
Arguments
(e.g.,
INR
).yyyy-MM-dd
format. If no expiry is set, the payment link will expire in 30 days by default.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/paymentlinks?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/paymentlinks?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/paymentlinks?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/paymentlinks?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/paymentlinks?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/paymentlinks?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/paymentlinks");
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/paymentlinks',
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/paymentlinks?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/paymentlinks?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/paymentlinks');
$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/paymentlinks');
$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();
curl --request POST \
--url 'https://payments.zoho.in/api/v1/paymentlinks?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"amount": 100.5,
"currency": "INR",
"email": "xxx@abc.com",
"phone": "+91 0000000000",
"reference_id": "1234567890IUEGS",
"description": "Payment for Order #12345",
"expires_at": "2025-03-14",
"notify_user": true,
"return_url": "https://example.com/success"
}
{
"code": 0,
"message": "Payment link created successfully",
"payment_links": {
"payment_link_id": "173000002315107",
"url": "https://payments.zoho.in/paymentlink/b0ec9b455584e8ee1dc0fd479f7ad4601ea39169f8aaf9991b83",
"expires_at": "2025-03-14",
"amount": "100.50",
"amount_paid": "0.00",
"currency": "INR",
"status": "active",
"email": "xxx@abc.com",
"reference_id": "1234567890IUEGS",
"description": "Payment for Order #12345",
"return_url": "https://example.com/success",
"phone": "+91 0000000000",
"created_time": 1708950672,
"created_by_id": "173000002314885",
"created_by": "Akash",
"last_modified_by_id": "173000002314885",
"last_modified": "Akash"
}
}
Update Payment Link
This API endpoint allows you to update the payment link. You can modify the customer email, phone number, reference, description, and expiry date. The link must be active to make modifications.
OAuth Scope : ZohoPay.payments.UPDATE
Arguments
yyyy-MM-dd
format. If no expiry is set, the payment link will expire in 30 days by default.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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107");
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/paymentlinks/173000002315107',
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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107');
$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/paymentlinks/173000002315107');
$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();
curl --request PUT \
--url 'https://payments.zoho.in/api/v1/paymentlinks/173000002315107?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"reference_id": "1234567890IUEGS",
"email": "xxx@abc.com",
"phone": "+91 0000000000",
"description": "Payment for Order #12345",
"expires_at": "2025-03-14",
"notify_user": true,
"return_url": "https://example.com/success"
}
{
"code": 0,
"message": "Payment link updated",
"payment_links": {
"payment_link_id": "173000002315107",
"url": "https://payments.zoho.in/paymentlink/b0ec9b455584e8ee1dc0fd479f7ad4601ea39169f8aaf9991b83",
"expires_at": "2025-03-14",
"amount": "100.50",
"amount_paid": "0.00",
"currency": "INR",
"status": "active",
"email": "xxx@abc.com",
"reference_id": "1234567890IUEGS",
"description": "Payment for Order #12345",
"return_url": "https://example.com/success",
"phone": "+91 0000000000",
"created_time": 1708950672,
"created_by_id": "173000002314885",
"created_by": "Akash",
"last_modified_by_id": "173000002314885",
"last_modified": "Akash"
}
}
Retrieve Payment Link
This API endpoint allows you to retrieve the details of a specific payment link.
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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107");
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/paymentlinks/173000002315107',
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/paymentlinks/173000002315107?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/paymentlinks/173000002315107?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/paymentlinks/173000002315107');
$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/paymentlinks/173000002315107');
$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();
curl --request GET \
--url 'https://payments.zoho.in/api/v1/paymentlinks/173000002315107?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"payment_links": {
"payment_link_id": "173000002315107",
"url": "https://payments.zoho.in/paymentlink/b0ec9b455584e8ee1dc0fd479f7ad4601ea39169f8aaf9991b83",
"expires_at": "2025-03-14",
"amount": "100.50",
"amount_paid": "100.50",
"currency": "INR",
"status": "paid",
"email": "xxx@abc.com",
"reference_id": "1234567890IUEGS",
"description": "Payment for Order #12345",
"return_url": "https://example.com/success",
"phone": "+91 0000000000",
"created_by": "Akash",
"created_by_id": "173000002314885",
"last_modified_by_id": "173000002314885",
"last_modified": "Akash",
"created_time": 1708950672,
"payments": [
{
"payment_id": "173000002314883",
"amount": "100.50",
"status": "succeeded",
"date": 1708950750
}
]
}
}
Cancel Payment Link
This API endpoint allows you to cancel the payment link. Once cancelled, it cannot be undone.
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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel");
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/paymentlinks/173000002315107/cancel',
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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel?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/paymentlinks/173000002315107/cancel');
$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/paymentlinks/173000002315107/cancel');
$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();
curl --request PUT \
--url 'https://payments.zoho.in/api/v1/paymentlinks/173000002315107/cancel?account_id=23137556' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Payment link Cancelled",
"payment_links": {
"payment_link_id": "173000002315107",
"url": "https://payments.zoho.in/paymentlink/b0ec9b455584e8ee1dc0fd479f7ad4601ea39169f8aaf9991b83",
"expires_at": "2025-03-14",
"amount": "100.50",
"amount_paid": "0.00",
"currency": "INR",
"status": "canceled",
"email": "xxx@abc.com",
"reference_id": "1234567890IUEGS",
"description": "Payment for Order #12345",
"return_url": "https://example.com/success",
"phone": "+91 0000000000",
"created_time": 1708950672,
"created_by_id": "173000002314885",
"created_by": "Akash",
"last_modified_by_id": "173000002314885",
"last_modified": "Akash"
}
}