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
check, cash, creditcard, banktransfer, bankremittance, autotransaction or others.autotransaction. Refunds would be made to the respective card provided by the customer.success or failure.autotransaction, autotransaction information will be displayed in the autotransaction object. It contains autotransaction_id, payment_gateway, gateway_transaction_id, card_id, last_four_digits, expiry_month and expiry_year.invoice_id, invoice_number, date, invoice_amount, amount_applied and balance_amount.{
"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",
"autotransaction": {
"autotransaction_id": "90300000079465",
"payment_gateway": "payflow_pro",
"gateway_transaction_id": "B10E6E0F31BD",
"gateway_error_message": "Gateway error message for a failed transaction.",
"card_id": "90300000079226",
"last_four_digits": 1111,
"expiry_month": 9,
"expiry_year": 2030
},
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"currency_code": "USD",
"currency_symbol": "$",
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
Create a payment
Create a new payment.
OAuth Scope : ZohoSubscriptions.payments.CREATE
Arguments
check, cash, creditcard, banktransfer, bankremittance, autotransaction or others.invoice_id, invoice_number, date, invoice_amount, amount_applied and balance_amount.Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/payments"
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/billing/v1/payments")
.post(body)
.addHeader("X-com-zoho-subscriptions-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-subscriptions-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/billing/v1/payments', 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-subscriptions-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/billing/v1/payments", 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": "/billing/v1/payments",
"headers": {
"X-com-zoho-subscriptions-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/billing/v1/payments \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-subscriptions-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"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,
"bank_charges": 10,
"tax_account_id": "903000000000370",
"account_id": "903000000000361",
"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",
"autotransaction": {
"autotransaction_id": "90300000079465",
"payment_gateway": "payflow_pro",
"gateway_transaction_id": "B10E6E0F31BD",
"gateway_error_message": "Gateway error message for a failed transaction.",
"card_id": "90300000079226",
"last_four_digits": 1111,
"expiry_month": 9,
"expiry_year": 2030
},
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"currency_code": "USD",
"currency_symbol": "$",
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
}
List payments
Get a list of payments with helpful pagination, filtering, search and sorting features. Perfect for viewing your payment data in organized ways, whether you need to find specific payments or browse through your records.
OAuth Scope : ZohoBooks.payments.READ
Query Parameters
filter_by. Allowed values are Status.(All, Sent, Draft, OverDue, Paid, PartiallyPaid, Void, Unpaid).Headers
headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/payments"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/billing/v1/payments")
.get()
.addHeader("X-com-zoho-subscriptions-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-subscriptions-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/billing/v1/payments', 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-subscriptions-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/billing/v1/payments", 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": "/billing/v1/payments",
"headers": {
"X-com-zoho-subscriptions-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/billing/v1/payments \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-subscriptions-organizationid: 10234695'
{
"code": 0,
"message": "success",
"payments": [
{
"payment_id": "9030000079467",
"invoice_number": "INV-384",
"reference_number": "INV-384",
"date": "2016-06-05",
"mode": "cash",
"status": "success",
"amount": 450,
"last_four_digits": 1111,
"customer_id": "903000000000099",
"customer_name": "Bowman Furniture",
"email": "benjamin.george@bowmanfurniture.com",
"gateway_transaction_id": "B10E6E0F31BD"
},
{...},
{...}
]
}
Update a payment
Update an existing payment information.
OAuth Scope : ZohoSubscriptions.payments.UPDATE
Arguments
check, cash, creditcard, banktransfer, bankremittance, autotransaction or others.invoice_id, invoice_number, date, invoice_amount, amount_applied and balance_amount.Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/payments/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/billing/v1/payments/9030000079467")
.put(body)
.addHeader("X-com-zoho-subscriptions-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-subscriptions-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/billing/v1/payments/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-subscriptions-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/billing/v1/payments/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": "/billing/v1/payments/9030000079467",
"headers": {
"X-com-zoho-subscriptions-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/billing/v1/payments/9030000079467 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-subscriptions-organizationid: 10234695' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"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,
"bank_charges": 10,
"tax_account_id": "903000000000370",
"account_id": "903000000000361",
"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",
"autotransaction": {
"autotransaction_id": "90300000079465",
"payment_gateway": "payflow_pro",
"gateway_transaction_id": "B10E6E0F31BD",
"gateway_error_message": "Gateway error message for a failed transaction.",
"card_id": "90300000079226",
"last_four_digits": 1111,
"expiry_month": 9,
"expiry_year": 2030
},
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"currency_code": "USD",
"currency_symbol": "$",
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
}
Retrieve a payment
Details of an existing payment.
OAuth Scope : ZohoSubscriptions.payments.READ
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/payments/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/billing/v1/payments/9030000079467")
.get()
.addHeader("X-com-zoho-subscriptions-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
'X-com-zoho-subscriptions-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/billing/v1/payments/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-subscriptions-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/billing/v1/payments/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": "/billing/v1/payments/9030000079467",
"headers": {
"X-com-zoho-subscriptions-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/billing/v1/payments/9030000079467 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-subscriptions-organizationid: 10234695'
{
"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",
"autotransaction": {
"autotransaction_id": "90300000079465",
"payment_gateway": "payflow_pro",
"gateway_transaction_id": "B10E6E0F31BD",
"gateway_error_message": "Gateway error message for a failed transaction.",
"card_id": "90300000079226",
"last_four_digits": 1111,
"expiry_month": 9,
"expiry_year": 2030
},
"invoices": [
{
"invoice_id": "90300000079426",
"invoice_number": "INV-384",
"date": "2016-06-05",
"invoice_amount": 450,
"amount_applied": 450,
"balance_amount": 0
}
],
"currency_code": "USD",
"currency_symbol": "$",
"custom_fields": [
{
"index": 1,
"value": 129890,
"label": "label",
"data_type": "text"
}
]
}
}
Delete a payment
Delete an existing payment.
OAuth Scope : ZohoSubscriptions.payments.DELETE
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-subscriptions-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/billing/v1/payments/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/billing/v1/payments/9030000079467")
.delete(null)
.addHeader("X-com-zoho-subscriptions-organizationid", "10234695")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
'X-com-zoho-subscriptions-organizationid': '10234695',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/billing/v1/payments/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-subscriptions-organizationid': "10234695",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/billing/v1/payments/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": "/billing/v1/payments/9030000079467",
"headers": {
"X-com-zoho-subscriptions-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/billing/v1/payments/9030000079467 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'X-com-zoho-subscriptions-organizationid: 10234695'
{
"code": 0,
"message": "The payment has been deleted."
}