API Docs
/
No Results Found
Customer Payments

Customer Payments

A payment object describes details regarding a particular customer payment. There can be multiple payments for a single invoice. Multiple invoices can be paid in a single payment as well.

Possible error codes:
Error CodeMessage
3004The Customer field can neither be blank nor incorrect. Please enter a correct Customer
9521Partial payment for retainer invoice is not allowed. Please record the full payment
9523Payment amount made to retainer invoice cannot be changed. You could instead delete it and add it back
24016The amount entered is more than the balance due for this invoice

Attribute

payment_id
string
Unique ID of the payment generated by the server. Maximum length allowed [2000]
payment_mode
string
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others. Maximum length [100]
amount
double
Amount paid in the respective payment.
amount_refunded
double
Amount that is refunded. Refunds are applicable only for payments whose payment_mode is autotransaction. Refunds would be made to the respective card provided by the customer.
bank_charges
double
Denotes any additional bank charges.
date
string
Date on which payment is made. Date Format [yyyy-mm-dd]
status
string
Status of the payment. It can either be success or failure.
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum length of the reference number [100]
description
string
Description about the payment.
customer_id
string
Customer ID of the customer involved in the payment.
customer_name
string
Name of the customer to whom the invoice is raised. Maximum length [100]
email
string
Email address of the customer involved in the payment.
invoices
array
Invoice related to a payment
Show Sub-Attributes arrow
invoice_id
string
Invoice ID of the required invoice.
invoice_payment_id
string
Payment ID of the invoice.
invoice_number
string
Unique ID (starts with INV) of an invoice.
date
Date on which the invoice was raised.
invoice_amount
double
Total amount raised for the invoice.
amount_applied
double
Amount paid for the invoice.
balance_amount
double
Unpaid amount of the invoice.
currency_code
string
Currency code in which the payment is made.
currency_symbol
string
Customer's currency symbol.
custom_fields
array
Custom fields for a payment received.
Show Sub-Attributes arrow
customfield_id
long
Unique ID of the custom field
data_type
string
Data type of the custom field
index
integer
The index of the custom field
label
string
Name of the custom field
show_on_pdf
boolean
Enable/Disable show this custom field on pdf for that invoice
show_in_all_pdf
Enable/Disable show this custom field on all the pdf
value
integer
Value of the custom field

Example

{ "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "test@zylker.org", "invoices": [ { "invoice_id": "90300000079426", "invoice_payment_id": "27161000000203281", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "number", "index": 1, "label": "Record Number", "show_on_pdf": true, "show_in_all_pdf": true, "value": 23 } ] }

Create a payment

Create a new payment.
OAuth Scope : ZohoInvoice.customerpayments.CREATE

Arguments

customer_id
string
(Required)
Customer ID of the customer involved in the payment.
payment_mode
string
(Required)
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others. Maximum length [100]
amount
double
(Required)
Amount paid in the respective payment.
date
string
(Required)
Date on which payment is made. Date Format [yyyy-mm-dd]
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum length of the reference number [100]
description
string
Description about the payment.
invoices
array
(Required)
List of invoices associated with the payment. Each invoice object contains invoice_id, invoice_number, date, invoice_amount, amount_applied and balance_amount.
Show Sub-Attributes arrow
invoice_id
string
(Required)
Invoice ID of the required invoice.
amount_applied
double
(Required)
Amount paid for the invoice.
exchange_rate
double
, default is 1
Exchange rate for the currency used in the invoices and customer's currency. The payment amount would be the multiplicative product of the original amount and the exchange rate.
payment_form
string
🇲🇽 Mexico
only
Mode of Vendor Payment
bank_charges
double
Denotes any additional bank charges.
custom_fields
array
Custom fields for a payment received.
Show Sub-Attributes arrow
label
string
Name of the custom field
value
integer
Value of the custom field

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments" 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/invoice/v3/customerpayments") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments', 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-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/customerpayments", 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": "/invoice/v3/customerpayments", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "903000000000099", "payment_mode": "cash", "amount": 450, "date": "2016-06-05", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "invoices": [ { "invoice_id": "90300000079426", "amount_applied": 450 } ], "exchange_rate": 1, "payment_form": "cash", "bank_charges": 10, "custom_fields": [ { "label": "Record Number", "value": 23 } ] }

Response Example

{ "code": 0, "message": "The payment has been created.", "payment": { "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "test@zylker.org", "invoices": [ { "invoice_id": "90300000079426", "invoice_payment_id": "27161000000203281", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "number", "index": 1, "label": "Record Number", "show_on_pdf": true, "show_in_all_pdf": true, "value": 23 } ] } }

List Customer Payments

List all the payments made by your customer.
OAuth Scope : ZohoInvoice.customerpayments.READ

Query Parameters

customer_name
Search payments by customer name. Variants: customer_name_startswith and customer_name_contains. Maximum length [100]
reference_number
Search payments by reference number. Variants: reference_number_startswith and reference_number_contains. Maximum length [100]
date
Date on which payment is made. Date Format [yyyy-mm-dd]
amount
Search payments by payment amount. Variants: amount_less_than, amount_less_equals, amount_greater_than and amount_greater_equals
notes
Search payments by customer notes. Variants: notes_startswith and notes_contains
payment_mode
Search payments by payment mode. Variants: payment_mode_startswith and payment_mode_contains
filter_by
Filter payments by mode.Allowed Values: PaymentMode.All, PaymentMode.Check, PaymentMode.Cash, PaymentMode.BankTransfer, PaymentMode.Paypal, PaymentMode.CreditCard, PaymentMode.GoogleCheckout, PaymentMode.Credit, PaymentMode.Authorizenet, PaymentMode.BankRemittance, PaymentMode.Payflowpro, PaymentMode.Stripe, PaymentMode.TwoCheckout, PaymentMode.Braintree and PaymentMode.Others
sort_column
Sort based on selected column
search_text
Search payments by reference number or customer name or payment description. Maximum length [100]

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/customerpayments") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/customerpayments", 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": "/invoice/v3/customerpayments", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "customerpayments": [ { "payment_id": "9030000079467", "payment_number": "2", "invoice_number": "INV-384", "date": "2016-06-05", "payment_mode": "cash", "amount": 450, "bcy_amount": 450 }, {...}, {...} ] }

Update custom field in existing customerpayments

Update the value of the custom field in existing customerpayments.
OAuth Scope : ZohoInvoice.customerpayments.UPDATE

Arguments

customfield_id
long
value
integer
Value of the custom field

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayment/9030000079467/customfields" 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/invoice/v3/customerpayment/9030000079467/customfields") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .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-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/customerpayment/9030000079467/customfields', 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-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/customerpayment/9030000079467/customfields", 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": "/invoice/v3/customerpayment/9030000079467/customfields", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayment/9030000079467/customfields \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
[ { "customfield_id": "46000000012845", "value": 23 } ]

Response Example

{ "code": 0, "message": "Custom Fields Updated Successfully" }

Update a payment

Update an existing payment information.
OAuth Scope : ZohoInvoice.customerpayments.UPDATE

Arguments

customer_id
string
(Required)
Customer ID of the customer involved in the payment.
payment_mode
string
(Required)
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others. Maximum length [100]
amount
double
(Required)
Amount paid in the respective payment.
date
string
(Required)
Date on which payment is made. Date Format [yyyy-mm-dd]
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum length of the reference number [100]
description
string
Description about the payment.
invoices
array
(Required)
Invoice associated to a payment
Show Sub-Attributes arrow
invoice_id
string
(Required)
Invoice ID of the required invoice.
invoice_payment_id
string
Payment ID of the invoice.
amount_applied
double
(Required)
Amount paid for the invoice.
exchange_rate
double
, default is 1
Exchange rate for the currency used in the invoices and customer's currency. The payment amount would be the multiplicative product of the original amount and the exchange rate.
payment_form
string
🇲🇽 Mexico
only
Mode of Vendor Payment
bank_charges
double
Denotes any additional bank charges.
custom_fields
array
Additional fields to support payment information
Show Sub-Attributes arrow
label
string
Name of the custom field
value
integer
Value of the custom field

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467" 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/invoice/v3/customerpayments/9030000079467") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .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-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467', 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-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/customerpayments/9030000079467", 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": "/invoice/v3/customerpayments/9030000079467", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "customer_id": "903000000000099", "payment_mode": "cash", "amount": 450, "date": "2016-06-05", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "invoices": [ { "invoice_id": "90300000079426", "invoice_payment_id": "27161000000203281", "amount_applied": 450 } ], "exchange_rate": 1, "payment_form": "cash", "bank_charges": 10, "custom_fields": [ { "label": "Record Number", "value": 23 } ] }

Response Example

{ "code": 0, "message": "The payment details have been updated.", "payment": { "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "test@zylker.org", "invoices": [ { "invoice_id": "90300000079426", "invoice_payment_id": "27161000000203281", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "number", "index": 1, "label": "Record Number", "show_on_pdf": true, "show_in_all_pdf": true, "value": 23 } ] } }

Retrieve a payment

Details of an existing payment.
OAuth Scope : ZohoInvoice.customerpayments.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/customerpayments/9030000079467", 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": "/invoice/v3/customerpayments/9030000079467", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "success", "payment": { "payment_id": "9030000079467", "payment_mode": "cash", "amount": 450, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "success", "reference_number": "INV-384", "description": "Payment has been added to INV-384", "online_transaction_id": "", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "test@zylker.org", "invoices": [ { "invoice_id": "90300000079426", "invoice_payment_id": "27161000000203281", "invoice_number": "INV-384", "date": "2016-06-05", "invoice_amount": 450, "amount_applied": 450, "balance_amount": 0 } ], "currency_code": "USD", "currency_symbol": "$", "custom_fields": [ { "customfield_id": 439910000000236000, "data_type": "number", "index": 1, "label": "Record Number", "show_on_pdf": true, "show_in_all_pdf": true, "value": 23 } ] } }

Delete a payment

Delete an existing payment.
OAuth Scope : ZohoInvoice.customerpayments.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/customerpayments/9030000079467", 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": "/invoice/v3/customerpayments/9030000079467", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467 \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The payment has been deleted." }

Refund an excess customer payment

Refund the excess amount paid by the customer.
OAuth Scope : ZohoInvoice.customerpayments.CREATE

Arguments

date
string
(Required)
Date on which payment is made. Date Format [yyyy-mm-dd]
refund_mode
string
The method of refund. Maximum length [50]
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum length of the reference number [100]
amount
double
(Required)
Amount paid in the respective payment.
exchange_rate
double
, default is 1
Exchange rate for the currency used in the invoices and customer's currency. The payment amount would be the multiplicative product of the original amount and the exchange rate.
payment_form
string
🇲🇽 Mexico
only
Mode of Vendor Payment
description
string
Description about the payment.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds" 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/invoice/v3/customerpayments/9030000079467/refunds") .post(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds', 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-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/invoice/v3/customerpayments/9030000079467/refunds", 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": "/invoice/v3/customerpayments/9030000079467/refunds", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467/refunds \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "exchange_rate": 1, "payment_form": "cash", "description": "Payment has been added to INV-384" }

Response Example

{ "code": 0, "message": "The refund information for this payment has been saved.", "payment_refunds": [ { "payment_refund_id": "3000000003017", "payment_id": "9030000079467", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "exchange_rate": 1, "payment_form": "cash", "description": "Payment has been added to INV-384" }, {...}, {...} ] }

List refunds of a customer payment

List all the refunds pertaining to an existing customer payment.
OAuth Scope : ZohoInvoice.customerpayments.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/customerpayments/9030000079467/refunds", 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": "/invoice/v3/customerpayments/9030000079467/refunds", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467/refunds \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The list of refunds of the customer is displayed successfully.", "payment_refunds": [ { "payment_refund_id": "3000000003017", "payment_id": "9030000079467", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "payment_number": "2", "customer_name": "Bowman Furniture", "amount_bcy": 10, "amount_fcy": 10 }, {...}, {...} ] }

Update a refund

Update the refunded transaction.
OAuth Scope : ZohoInvoice.customerpayments.UPDATE

Arguments

date
string
(Required)
Date on which payment is made. Date Format [yyyy-mm-dd]
refund_mode
string
The method of refund. Maximum length [50]
reference_number
string
Reference number generated for the payment. A string of your choice can also be used as the reference number. Maximum length of the reference number [100]
amount
double
(Required)
Amount paid in the respective payment.
exchange_rate
double
, default is 1
Exchange rate for the currency used in the invoices and customer's currency. The payment amount would be the multiplicative product of the original amount and the exchange rate.
payment_form
string
🇲🇽 Mexico
only
Mode of Vendor Payment
description
string
Description about the payment.

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/" 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/invoice/v3/customerpayments/9030000079467/refunds/") .put(body) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .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-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/', 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-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PUT", "/invoice/v3/customerpayments/9030000079467/refunds/", 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": "/invoice/v3/customerpayments/9030000079467/refunds/", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467/refunds/ \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "exchange_rate": 1, "payment_form": "cash", "description": "Payment has been added to INV-384" }

Response Example

{ "code": 0, "message": "The refund information has been saved.", "payment_refunds": [ { "payment_refund_id": "3000000003017", "payment_id": "9030000079467", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "exchange_rate": 1, "payment_form": "cash", "description": "Payment has been added to INV-384" }, {...}, {...} ] }

Details of a refund

Obtain details of a particular refund of a customer payment.
OAuth Scope : ZohoInvoice.customerpayments.READ

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/" type: GET headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/") .get() .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/invoice/v3/customerpayments/9030000079467/refunds/", 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": "/invoice/v3/customerpayments/9030000079467/refunds/", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467/refunds/ \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The details of the refund are displayed successfully.", "payment_refunds": { "payment_refund_id": "3000000003017", "payment_id": "9030000079467", "date": "2016-06-05", "refund_mode": "cash", "reference_number": "INV-384", "amount": 450, "exchange_rate": 1, "payment_form": "cash", "description": "Payment has been added to INV-384" } }

Delete a Refund

Delete refund pertaining to an existing customer payment.
OAuth Scope : ZohoInvoice.customerpayments.DELETE

Request Example

Click to copy
headers_data = Map(); headers_data.put("X-com-zoho-invoice-organizationid", "10234695"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/" type: DELETE headers: headers_data connection: <connection_name> ] info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/") .delete(null) .addHeader("X-com-zoho-invoice-organizationid", "10234695") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'DELETE', headers: { 'X-com-zoho-invoice-organizationid': '10234695', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://www.zohoapis.com/invoice/v3/customerpayments/9030000079467/refunds/', 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 = { 'X-com-zoho-invoice-organizationid': "10234695", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("DELETE", "/invoice/v3/customerpayments/9030000079467/refunds/", 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": "/invoice/v3/customerpayments/9030000079467/refunds/", "headers": { "X-com-zoho-invoice-organizationid": "10234695", "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/invoice/v3/customerpayments/9030000079467/refunds/ \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'X-com-zoho-invoice-organizationid: 10234695'

Response Example

{ "code": 0, "message": "The refund has been deleted." }