- Introduction
- OAuth
- HTTP Methods
- Response
- Errors
- Pagination
- Organizations
- Contacts
- Contact Persons
- Item Groups
- Items
- Composite Items
- Item Adjustments
- Transfer Orders
- Sales Orders
- Packages
- Shipment Orders
- Invoices
- Overview
- Create an invoice
- List invoices
- Update an invoice
- Get an invoice
- Delete an invoice
- Mark an invoice as sent
- Void an invoice
- Mark as draft
- Email an invoice
- Get invoice email content
- Email invoices
- Get payment reminder mail content
- Bulk export Invoices
- Bulk print invoices
- Disable payment reminder
- Enable payment reminder
- Write off invoice
- Cancel write off
- Update billing address
- Update shipping address
- List invoice templates
- Update invoice template
- List invoice payments
- List credits applied
- Apply credits
- Delete a payment
- Delete applied credit
- Add attachment to an invoice
- Update attachment preference
- Get an invoice attachment
- Delete an attachment
- Add comment
- List invoice comments & history
- Update comment
- Delete a comment
- Retainer Invoices
- Overview
- Create a retainer invoice
- List a retainer invoices
- update a retainer invoice
- Get a retainer invoice
- Delete a retainer invoice
- Mark a retainer invoice as sent
- Update retainer invoice template
- Void a retainer invoice
- Mark as draft
- Submit a retainer invoice for approval
- Approve a retainer invoice.
- Email a retainer invoice
- Get retainer invoice email content
- Update billing address
- List retainer invoice templates
- Add attachment to a retainer invoice
- Get a retainer invoice attachment
- Delete an attachment
- Add comment
- List retainer invoice comments & history
- Update comment
- Delete a comment
- Customer Payments
- Sales Returns
- Credit Notes
- Overview
- Create a credit note
- List all Credit Notes
- Update a credit note
- Get a credit note
- Delete a credit note
- Email a credit note
- Get email content
- Void a Credit Note
- Convert Credit Note to Draft
- Convert credit note to Open
- Submit a credit note for approval
- Approve a credit note
- Email history
- Update billing address
- Update Shipping address
- List the credit note templates
- Update a credit note template
- Apply credits to invoices
- List invoices credited
- Delete credits applied to an invoice
- Add a comment
- List credit note comments & history
- Delete a Comment
- List credit note refunds
- Refund credit note
- List refunds of a credit note
- Update credit note refund
- Get credit note refund
- Delete credit note refund
- Purchase Orders
- Purchase Receives
- Bills
- Vendor Credits
- Overview
- Create a vendor credit
- List vendor credits
- Update vendor credit
- Get vendor credit
- Delete vendor credit
- Convert to open
- Void vendor credit
- Submit a Vendor credit for approval
- Approve a Vendor credit
- Apply credits to a bill
- List bills credited
- Delete bills credited
- Refund a vendor credit
- List refunds of a vendor credit
- Update vendor credit refund
- Get vendor credit refund
- Delete vendor credit refund
- List vendor credit refunds
- Add a comment
- List vendor credit comments & history
- Delete a comment
- Warehouse Settings
- Price Lists
- Taxes
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.
Attribute
- payment_idstring
Unique ID of the payment generated by the server. Maximum length allowed [2000]
- payment_modestring
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others. Maximum length [100]
- amountdouble
Amount paid in the respective payment.
- amount_refundeddouble
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_chargesdouble
Denotes any additional bank charges.
- datestring
Date on which payment is made. Date Format [yyyy-mm-dd]
- statusstring
Status of the payment. It can either be success or failure.
- reference_numberstring
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]
- descriptionstring
Description about the payment.
- customer_idstring
Customer ID of the customer involved in the payment.
- customer_namestring
Name of the customer to whom the invoice is raised. Maximum length [100]
- emailstring
Email address of the customer involved in the payment.
- tax_amount_withhelddouble
Amount withheld for tax.
- invoicesarray
Invoice related to a payment
Show Sub-Attributes
- invoice_idstring
Invoice ID of the required invoice.
- invoice_numberstring
Unique ID (starts with INV) of an invoice.
- dateDate on which the invoice was raised.
invoice_amount
- doubleTotal amount raised for the invoice.
amount_applied
- doubleAmount paid for the invoice.
balance_amount
- doubleUnpaid amount of the invoice.
undefined
- exchange_ratedouble, 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.
- currency_idstring
ID of the currency used in the payment
- currency_codestring
Currency code in which the payment is made.
- currency_symbolstring
Customer's currency symbol.
- account_idstring
ID of the cash/ bank account the payment has to be deposited.
- account_namestring
Name of the cash/ bank account the payment has to be deposited.
- tax_account_idstring
ID of the tax account, in case of withholding tax.
- tax_account_namestring
Name of the tax account, in case of withholding tax.
- unused_amountdouble
Amount which is not used for invoice payment yet.
- last_four_digitsinteger
Last four digits of the card.
- custom_fieldsarray
Additional field for a payment
Show Sub-Attributes
- indexinteger
Index of the custom field. It can hold any value from 1 to 10.
- valuestring
Value of the custom field.
- labelstring
Label of the custom field.
- data_typestring
Data type of the custom field.
{
"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": "benjamin.george@bowmanfurniture.com",
"tax_amount_withheld": 0,
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"exchange_rate": 1,
"currency_id": "3000000002321",
"currency_code": "USD",
"currency_symbol": "$",
"account_id": "450000000000353",
"account_name": "Petty Cash",
"tax_account_id": "",
"tax_account_name": "",
"unused_amount": 0,
"last_four_digits": 1111,
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
Create a payment
Create a new payment.
OAuth Scope : ZakyaAPI.customerpayments.CREATE
Arguments
- customer_idstring (Required)
Customer ID of the customer involved in the payment.
- payment_modestring (Required)
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others. Maximum length [100]
- amountdouble (Required)
Amount paid in the respective payment.
- datestring
Date on which payment is made. Date Format [yyyy-mm-dd]
- reference_numberstring
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]
- descriptionstring
Description about the payment.
- invoicesarray (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
- invoice_idstring (Required)
Invoice ID of the required invoice.
- amount_applieddouble (Required)
Amount paid for the invoice.
- tax_amount_withhelddouble
Amount withheld for tax.
- exchange_ratedouble, 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.
- bank_chargesdouble
Denotes any additional bank charges.
- account_idstring
ID of the cash/ bank account the payment has to be deposited.
- tax_account_idstring
ID of the tax account, in case of withholding tax.
- custom_fieldsarray
Additional fields for the payments.
Show Sub-Attributes
- labelstring
Label of the custom field.
- valuestring
Value of the custom field.
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/customerpayments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/customerpayments?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
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://api.zakya.com/inventory/v1/customerpayments?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 http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/customerpayments?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();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/customerpayments?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("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/customerpayments?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"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,
"tax_amount_withheld": 0
}
],
"exchange_rate": 1,
"bank_charges": 10,
"account_id": "450000000000353",
"tax_account_id": "",
"custom_fields": [
{
"label": "label",
"value": 129890
}
]
}
{
"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": "benjamin.george@bowmanfurniture.com",
"tax_amount_withheld": 0,
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"exchange_rate": 1,
"currency_id": "3000000002321",
"currency_code": "USD",
"currency_symbol": "$",
"account_id": "450000000000353",
"account_name": "Petty Cash",
"tax_account_id": "",
"tax_account_name": "",
"unused_amount": 0,
"last_four_digits": 1111,
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
}
List Customer Payments
List all the payments made by your customer.
OAuth Scope : ZakyaAPI.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]
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/customerpayments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/customerpayments?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/customerpayments?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/customerpayments?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();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/customerpayments?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("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/customerpayments?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"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,
"unused_amount": 0,
"account_id": "450000000000353",
"account_name": "Petty Cash",
"description": "Payment has been added to INV-384",
"reference_number": "INV-384",
"customer_id": "903000000000099",
"customer_name": "Bowman Furniture"
},
{...},
{...}
]
}
Update a payment
Update an existing payment information.
OAuth Scope : ZakyaAPI.customerpayments.UPDATE
Arguments
- customer_idstring (Required)
Customer ID of the customer involved in the payment.
- payment_modestring (Required)
Mode through which payment is made. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others. Maximum length [100]
- amountdouble (Required)
Amount paid in the respective payment.
- datestring
Date on which payment is made. Date Format [yyyy-mm-dd]
- reference_numberstring
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]
- descriptionstring
Description about the payment.
- invoicesarray (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
- invoice_idstring (Required)
Invoice ID of the required invoice.
- amount_applieddouble (Required)
Amount paid for the invoice.
- tax_amount_withhelddouble
Amount withheld for tax.
- exchange_ratedouble, 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.
- bank_chargesdouble
Denotes any additional bank charges.
- account_idstring
ID of the cash/ bank account the payment has to be deposited.
- tax_account_idstring
ID of the tax account, in case of withholding tax.
- custom_fieldsarray
Additional fields for the payments.
Show Sub-Attributes
- labelstring
Label of the custom field.
- valuestring
Value of the custom field.
curl --request PUT \
--url 'https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
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://api.zakya.com/inventory/v1/customerpayments/9030000079467?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 http = require("https");
const options = {
"method": "PUT",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/customerpayments/9030000079467?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();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/customerpayments/9030000079467?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("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/customerpayments/9030000079467?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"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,
"tax_amount_withheld": 0
}
],
"exchange_rate": 1,
"bank_charges": 10,
"account_id": "450000000000353",
"tax_account_id": "",
"custom_fields": [
{
"label": "label",
"value": 129890
}
]
}
{
"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": "benjamin.george@bowmanfurniture.com",
"tax_amount_withheld": 0,
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"exchange_rate": 1,
"currency_id": "3000000002321",
"currency_code": "USD",
"currency_symbol": "$",
"account_id": "450000000000353",
"account_name": "Petty Cash",
"tax_account_id": "",
"tax_account_name": "",
"unused_amount": 0,
"last_four_digits": 1111,
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
}
Retrieve a payment
Details of an existing payment.
OAuth Scope : ZakyaAPI.customerpayments.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/customerpayments/9030000079467?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();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/customerpayments/9030000079467?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("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/customerpayments/9030000079467?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"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",
"customer_id": "903000000000099",
"customer_name": "Bowman Furniture",
"email": "benjamin.george@bowmanfurniture.com",
"tax_amount_withheld": 0,
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"exchange_rate": 1,
"currency_id": "3000000002321",
"currency_code": "USD",
"currency_symbol": "$",
"account_id": "450000000000353",
"account_name": "Petty Cash",
"tax_account_id": "",
"tax_account_name": "",
"unused_amount": 0,
"last_four_digits": 1111,
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
}
Delete a payment
Delete an existing payment.
OAuth Scope : ZakyaAPI.customerpayments.DELETE
curl --request DELETE \
--url 'https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/customerpayments/9030000079467?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/customerpayments/9030000079467?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();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/customerpayments/9030000079467?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("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/inventory/v1/customerpayments/9030000079467?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "The payment has been deleted."
}