Vendor Payments
Payments to Vendors towards Bills.
Create a vendor payment
Create a payment made to your vendor and you can also apply them to bills either partially or fully.
OAuth Scope : ZohoBooks.vendorpayments.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
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://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/vendorpayments?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments?organization_id=10234695",
"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();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"vendor_id": "460000000026049",
"bills": [
{
"bill_payment_id": "460000000053221",
"bill_id": "460000000053199",
"amount_applied": 150,
"tax_amount_withheld": 0.1
}
],
"date": "2013-10-07",
"exchange_rate": 1,
"amount": 500,
"paid_through_account_id": "460000000000358",
"payment_mode": "Stripe",
"description": "string",
"reference_number": "REF#912300",
"check_details": [
"string"
],
"is_paid_via_print_check": false,
"custom_fields": [
{
"index": 0,
"value": "string"
}
]
}
{
"code": 0,
"message": "The payment made to the vendor has been recorded.",
"ach_payment_status": "string",
"amount": 500,
"balance": 300,
"billing_address": [
"address",
"city",
"state",
"zip",
"country",
"fax",
"attention"
],
"bills": [
{
"bill_payment_id": "460000000053221",
"bill_id": "460000000053199",
"amount_applied": 150,
"tax_amount_withheld": 0.1,
"balance": 300,
"bill_number": "B-1000",
"date": "2013-10-07",
"due_date": "2013-10-07",
"price_precision": 2,
"total": 450
}
],
"check_details": {
"amount_in_words": "string",
"check_id": "string",
"check_number": "string",
"check_status": "string",
"memo": "string"
},
"comments": "Payment of amount $150.00 made and applied for b-01",
"created_time": "2016-12-16T00:18:42-0500",
"currency_id": "460000000000099",
"currency_symbol": "$",
"custom_fields": [
{
"custom_field_id": "string",
"index": 0,
"label": "string",
"value": "string"
}
],
"date": "2013-10-07",
"description": "string",
"exchange_rate": 1,
"imported_transactions": [
"string"
],
"documents": [
"string"
],
"is_ach_payment": false,
"is_paid_via_print_check": false,
"last_modified_time": "string",
"paid_through_account_id": "460000000000358",
"paid_through_account_name": "Undeposited Funds",
"paid_through_account_type": "cash",
"payment_id": "460000000053219",
"payment_mode": "Stripe",
"payment_number": 4,
"reference_number": "REF#912300",
"tax_account_name": "string",
"tax_amount_withheld": 0.1,
"vendor_id": "460000000026049",
"vendor_name": "Bowman and Co",
"vendorpayment_refunds": [
{
"vendorpayment_refund_id": "460000000003017",
"date": "2017-01-10",
"refund_mode": "cash",
"reference_number": "string",
"description": "Payment Refund",
"amount_bcy": 4,
"amount_fcy": 4
}
]
}
Update an vendor payment using a custom field's unique value
A custom field will have unique values if it's configured to not accept duplicate values. Now, you can use that custom field's value to update a vendor payment by providing its API name in the X-Unique-Identifier-Key header and its value in the X-Unique-Identifier-Value header. Based on this value, the corresponding vendor payment will be retrieved and updated. Additionally, there is an optional X-Upsert header. If the X-Upsert header is true and the custom field's unique value is not found in any of the existing vendor payments, a new vendor payment will be created if the necessary payload details are available
OAuth Scope : ZohoBooks.vendorpayments.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-Unique-Identifier-Key", "cf_unique_cf");
headers_data.put("X-Unique-Identifier-Value", "unique Value");
headers_data.put("X-Upsert", "true");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
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://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695")
.put(body)
.addHeader("X-Unique-Identifier-Key", "cf_unique_cf")
.addHeader("X-Unique-Identifier-Value", "unique Value")
.addHeader("X-Upsert", "true")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
'X-Unique-Identifier-Key': 'cf_unique_cf',
'X-Unique-Identifier-Value': 'unique Value',
'X-Upsert': 'true',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'X-Unique-Identifier-Key': "cf_unique_cf",
'X-Unique-Identifier-Value': "unique Value",
'X-Upsert': "true",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/vendorpayments?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments?organization_id=10234695",
"headers": {
"X-Unique-Identifier-Key": "cf_unique_cf",
"X-Unique-Identifier-Value": "unique Value",
"X-Upsert": "true",
"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();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-Unique-Identifier-Key: cf_unique_cf' \
--header 'X-Unique-Identifier-Value: unique Value' \
--header 'X-Upsert: true' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"vendor_id": "460000000026049",
"bills": [
{
"bill_payment_id": "460000000053221",
"bill_id": "460000000053199",
"amount_applied": 150,
"tax_amount_withheld": 0.1
}
],
"date": "2013-10-07",
"exchange_rate": 1,
"amount": 500,
"paid_through_account_id": "460000000000358",
"payment_mode": "Stripe",
"description": "string",
"reference_number": "REF#912300",
"is_paid_via_print_check": false,
"check_details": [
"string"
],
"custom_fields": [
{
"index": 0,
"value": "string"
}
]
}
{
"code": 0,
"message": "The details of the payment made to the vendor has been updated",
"vendorpayment": [
{
"payment_id": "460000000053219",
"vendor_id": "460000000026049",
"vendor_name": "Bowman and Co",
"payment_mode": "Stripe",
"payment_number": 4,
"custom_fields": [
{
"custom_field_id": "string",
"index": 0,
"label": "string",
"value": "string"
}
],
"description": "string",
"documents": [
"string"
],
"date": "2013-10-07",
"reference_number": "REF#912300",
"exchange_rate": 1,
"tax_account_name": "string",
"tax_amount_withheld": 0.1,
"amount": 500,
"balance": 300,
"currency_id": "460000000000099",
"currency_symbol": "$",
"created_time": "2016-12-16T00:18:42-0500",
"last_modified_time": "string",
"paid_through_account_id": "460000000000358",
"paid_through_account_name": "Undeposited Funds",
"paid_through_account_type": "cash",
"is_paid_via_print_check": false,
"is_ach_payment": false,
"ach_payment_status": "string",
"check_details": [
"string"
],
"billing_address": [
"address",
"city",
"state",
"zip",
"country",
"fax",
"attention"
],
"bills": [
{
"bill_payment_id": "460000000053221",
"bill_id": "460000000053199",
"amount_applied": 150,
"tax_amount_withheld": 0.1
}
],
"vendorpayment_refunds": [
{
"vendorpayment_refund_id": "460000000003017",
"date": "2017-01-10",
"refund_mode": "cash",
"reference_number": "string",
"description": "Payment Refund",
"amount_bcy": 4,
"amount_fcy": 4
}
],
"imported_transactions": [
"string"
]
},
{...},
{...}
]
}
List vendor payments
List all the payments made to your vendor.
OAuth Scope : ZohoBooks.vendorpayments.READ
Query Parameters
vendor_name_startswith
and vendor_name_contains
.reference_number_startswith
and reference_number_contains
. In refunds, reference number for the refund recorded.payment_number_startswith
, payment_number_contains
date_start
, date_end
, date_before
and date_after
.amount_less_than
, amount_less_equals
, amount_greater_than
and amount_greater_equals
. In refunds, Amount refunded from the vendor payment.payment_mode_startswith
and payment_mode_contains
.notes_startswith
, notes_contains
description_startswith
and description_contains
.PaymentMode.All
, PaymentMode.Check
, PaymentMode.Cash
, PaymentMode.BankTransfer
, PaymentMode.Paypal
, PaymentMode.CreditCard
, PaymentMode.GoogleCheckout
, PaymentMode.Credit
, PaymentMode.Authorizenet
, PaymentMode.BankRemittance
, PaymentMode.Payflowpro
and PaymentMode.Others
.vendor_name
, date
, reference_number
, amount
and balance
.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorpayments?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments?organization_id=10234695",
"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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorpayments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendorpayments": [
{
"payment_id": "460000000053219",
"vendor_id": "460000000026049",
"vendor_name": "Bowman and Co",
"bill_numbers": "string",
"payment_mode": "Stripe",
"payment_number": 4,
"description": "string",
"date": "2013-10-07",
"reference_number": "REF#912300",
"exchange_rate": 1,
"amount": 500,
"bcy_amount": 76,
"paid_through_account_id": "460000000000358",
"paid_through_account_name": "Undeposited Funds",
"balance": 300,
"bcy_balance": 76,
"created_time": "2016-12-16T00:18:42-0500",
"last_modified_time": "string",
"is_paid_via_print_check": false,
"has_attachment": false,
"is_ach_payment": false,
"ach_payment_status": "string",
"ach_gw_transaction_id": "string",
"check_details": [
{
"check_id": "string",
"check_status": "string",
"check_number": "string",
"memo": "string"
}
]
},
{...},
{...}
]
}
Update a vendor payment
Update an existing vendor payment. You can also modify the amount applied to the bills.
OAuth Scope : ZohoBooks.vendorpayments.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
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://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/vendorpayments/460000000053219?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219?organization_id=10234695",
"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();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"vendor_id": "460000000026049",
"bills": [
{
"bill_payment_id": "460000000053221",
"bill_id": "460000000053199",
"amount_applied": 150,
"tax_amount_withheld": 0.1
}
],
"date": "2013-10-07",
"exchange_rate": 1,
"amount": 500,
"paid_through_account_id": "460000000000358",
"payment_mode": "Stripe",
"description": "string",
"reference_number": "REF#912300",
"is_paid_via_print_check": false,
"check_details": [
"string"
],
"custom_fields": [
{
"index": 0,
"value": "string"
}
]
}
{
"code": 0,
"message": "The details of the payment made to the vendor has been updated",
"vendorpayment": [
{
"payment_id": "460000000053219",
"vendor_id": "460000000026049",
"vendor_name": "Bowman and Co",
"payment_mode": "Stripe",
"payment_number": 4,
"custom_fields": [
{
"custom_field_id": "string",
"index": 0,
"label": "string",
"value": "string"
}
],
"description": "string",
"documents": [
"string"
],
"date": "2013-10-07",
"reference_number": "REF#912300",
"exchange_rate": 1,
"tax_account_name": "string",
"tax_amount_withheld": 0.1,
"amount": 500,
"balance": 300,
"currency_id": "460000000000099",
"currency_symbol": "$",
"created_time": "2016-12-16T00:18:42-0500",
"last_modified_time": "string",
"paid_through_account_id": "460000000000358",
"paid_through_account_name": "Undeposited Funds",
"paid_through_account_type": "cash",
"is_paid_via_print_check": false,
"is_ach_payment": false,
"ach_payment_status": "string",
"check_details": [
"string"
],
"billing_address": [
"address",
"city",
"state",
"zip",
"country",
"fax",
"attention"
],
"bills": [
{
"bill_payment_id": "460000000053221",
"bill_id": "460000000053199",
"amount_applied": 150,
"tax_amount_withheld": 0.1
}
],
"vendorpayment_refunds": [
{
"vendorpayment_refund_id": "460000000003017",
"date": "2017-01-10",
"refund_mode": "cash",
"reference_number": "string",
"description": "Payment Refund",
"amount_bcy": 4,
"amount_fcy": 4
}
],
"imported_transactions": [
"string"
]
},
{...},
{...}
]
}
Get a vendor payment
Get the details of a vendor payment.
OAuth Scope : ZohoBooks.vendorpayments.READ
Query Parameters
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorpayments/460000000053219?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219?organization_id=10234695",
"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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendorpayment": {
"payment_id": "460000000053219",
"vendor_id": "460000000026049",
"vendor_name": "Bowman and Co",
"payment_mode": "Stripe",
"payment_number": 4,
"description": "string",
"date": "2013-10-07",
"reference_number": "REF#912300",
"exchange_rate": 1,
"tax_account_name": "string",
"tax_amount_withheld": 0.1,
"amount": 500,
"balance": 300,
"currency_id": "460000000000099",
"currency_symbol": "$",
"created_time": "2016-12-16T00:18:42-0500",
"last_modified_time": "string",
"paid_through_account_id": "460000000000358",
"paid_through_account_name": "Undeposited Funds",
"paid_through_account_type": "cash",
"is_paid_via_print_check": false,
"is_ach_payment": false,
"ach_payment_status": "string",
"check_details": {
"amount_in_words": "string",
"check_id": "string",
"check_number": "string",
"check_status": "string",
"memo": "string"
},
"billing_address": [
"address",
"city",
"state",
"zip",
"country",
"fax",
"attention"
],
"comments": "Payment of amount $150.00 made and applied for b-01",
"vendorpayment_refunds": [
{
"vendorpayment_refund_id": "460000000003017",
"date": "2017-01-10",
"refund_mode": "cash",
"reference_number": "string",
"description": "Payment Refund",
"amount_bcy": 4,
"amount_fcy": 4
}
],
"bills": [
{
"bill_payment_id": "460000000053221",
"bill_id": "460000000053199",
"amount_applied": 150,
"tax_amount_withheld": 0.1
}
],
"documents": [
"string"
],
"custom_fields": [
{
"custom_field_id": "string",
"index": 0,
"label": "string",
"value": "string"
}
]
}
}
Delete a vendor payment
Delete an existing vendor payment.
OAuth Scope : ZohoBooks.vendorpayments.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/books/v3/vendorpayments/460000000053219?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219?organization_id=10234695",
"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();
curl --request DELETE \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The payment has been deleted."
}
Refund an excess vendor payment
Refund the excess amount paid to the vendor.
OAuth Scope : ZohoBooks.vendorpayments.CREATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
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://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695",
"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();
curl --request POST \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"date": "2017-01-10",
"refund_mode": "cash",
"reference_number": "string",
"amount": 500,
"exchange_rate": 1,
"to_account_id": "460000000000385",
"description": "Payment Refund"
}
{
"code": 0,
"message": "Vendor Payment Refunded successfully",
"vendorpayment_refund": [
{
"vendorpayment_refund_id": "460000000003017",
"vendorpayment_id": "460000000003001",
"date": "2013-10-07",
"refund_mode": "cash",
"reference_number": "REF#912300",
"amount": 500,
"exchange_rate": 1,
"to_account_id": "460000000000385",
"to_account_name": "Petty Cash",
"description": "string"
},
{...},
{...}
]
}
List refunds of a vendor payment
List all the refunds pertaining to an existing vendor payment.
OAuth Scope : ZohoBooks.vendorpayments.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695",
"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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendorpayment_refunds": [
{
"vendorpayment_refund_id": "460000000003017",
"date": "2017-01-10",
"refund_mode": "cash",
"reference_number": "string",
"description": "Payment Refund",
"amount_bcy": 4,
"amount_fcy": 4
},
{...},
{...}
]
}
Update a refund
Update the refunded transaction.
OAuth Scope : ZohoBooks.vendorpayments.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
info response;
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://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695",
"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();
curl --request PUT \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"date": "2017-01-10",
"refund_mode": "cash",
"reference_number": "string",
"amount": 500,
"exchange_rate": 1,
"to_account_id": "460000000000385",
"description": "Payment Refund"
}
{
"code": 0,
"message": "The refund information has been saved.",
"vendorpayment_refund": [
{
"vendorpayment_refund_id": "460000000003017",
"vendorpayment_id": "460000000003001",
"date": "2013-10-07",
"refund_mode": "cash",
"reference_number": "REF#912300",
"amount": 500,
"exchange_rate": 1,
"to_account_id": "460000000000385",
"to_account_name": "Petty Cash",
"description": "string"
},
{...},
{...}
]
}
Details of a refund
Obtain details of a particular refund of a vendor payment.
OAuth Scope : ZohoBooks.vendorpayments.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695",
"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();
curl --request GET \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"vendorpayment_refund": [
{
"vendorpayment_refund_id": "460000000003017",
"vendorpayment_id": "460000000003001",
"date": "2013-10-07",
"refund_mode": "cash",
"reference_number": "REF#912300",
"amount": 500,
"exchange_rate": 1,
"to_account_id": "460000000000385",
"to_account_name": "Petty Cash",
"description": "string"
},
{...},
{...}
]
}
Delete a refund
Delete refund pertaining to an existing vendor payment.
OAuth Scope : ZohoBooks.vendorpayments.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.com",
"port": null,
"path": "/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695",
"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();
curl --request DELETE \
--url 'https://www.zohoapis.com/books/v3/vendorpayments/460000000053219/refunds/460000000003017?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "The refund has been deleted."
}