API Docs
/
No Results Found
Invoices

Invoices

Invoices describe how much a customer owes for his subscription. Invoices are created for recurring charges, one time charges including any prorated adjustments.

Attribute

invoice_id
string
Unique ID generated for an invoice.
number
string
Unique invoice number (starts with INV) generated for an invoice which will be used to display in interface and invoices.
status
string
Status of the invoice. It can be paid, sent, overdue, partially_paid or void.
invoice_date
string
The date on which the invoice is raised.
due_date
string
Date on which the invoice is due. If the invoice is not fully paid on or before this date, the status of the invoice will be changed to overdue. If the invoice is only partially paid, its status will be partially_paid.
payment_expected_date
string
A date to specify the expected payment date.
ach_payment_initiated
boolean
Set to true if ACH payment is initiated.
transaction_type
string
Type of the transaction made.
customer_id
string
Customer ID of the customer to whom the invoice is raised.
customer_name
string
Name of the customer to whom the invoice is raised.
email
string
Email address of the customer.
invoice_items
array
The list of items which are all included in the invoice. Each item object will have item_id, name, code, price, quantity and item_total. description: Small description about the Invoice item. example: "Charges for this duration (from 16-April-2016 to 8-June-2016)"
Show Sub-Attributes arrow
item_id
string
The ID of the item included in the invoice.
name
string
Name of the item included in the invoice.
description
Small description about the Invoice item.
code
string
Item code of the item included in the invoice.
tags
array
Show Sub-Attributes arrow
tag_id
long
ID of the Tag
tag_option_id
long
Id of the Tag Option
item_custom_fields
array
Custom fields for a item.
Show Sub-Attributes arrow
label
string
Label of the Custom Field
value
string
Value of the Custom Field
price
string
Price of the item included in the invoice.
quantity
integer
Quantity of the item included in the invoice.
discount_amount
double
The discount amount included in an invoice on applying a coupon.
item_total
integer
Cost of an item included in the invoice. This would be the product of quantity of the item included and the price of that item.
tax_id
string
Tax ID to which you would like to associate with this plan.
tax_exemption_id
string
Unique Tax Exemption ID if you dont want to associate a tax to the plan.
tax_exemption_code
string
Unique code to denote the tax exemption.
coupons
array
The array of objects which contains the details of the added coupon. coupon_code and discount_amount are applied to the invoice total.
Show Sub-Attributes arrow
coupon_code
string
The coupon code of the coupon applied to the invoice.
coupon_name
string
Name of the coupon applied to the subscription.
discount_amount
double
The discount amount included in an invoice on applying a coupon.
credits
array
Show Sub-Attributes arrow
creditnote_id
string
Unique ID denoting the credit note.
creditnotes_number
string
Reference number for the credit note.
credited_date
string
Date on which the credit were applied
credited_amount
string
Credited amount for the invoice
total
double
Total amount to be paid for the invoice. This would be the sum of individual costs of all items involved in the invoice. Total is determined only after customer credits (if any) are applied.
payment_made
double
Payments can be made in multiple instalments. payment_made refers to the amount paid for the invoice in the respective instalment.
balance
double
The unpaid amount of an invoice.
credits_applied
double
Credits applied for the invoice.
write_off_amount
double
The unpaid amount of an invoice that is written off.
payments
array
List of payment objects. Each object will contain payment_id, payment_mode, invoice_payment_id, gateway_transaction_id, description, date, reference_number, amount and bank_charges.
Show Sub-Attributes arrow
payment_id
string
The payment ID of the payment made for the invoice.
payment_mode
string
The mode in which payment is made for the invoice. This can be check, cash, creditcard, banktransfer, bankremittance, autotransaction or others.
invoice_payment_id
string
Unique ID generated for an instalment of payment made for a particular invoice.
amount_refunded
double
Amount that is refund. Refunds are applicable only for payments whose payment_mode is autotransaction. Refunds would be made to the respective card provided by the customer.
gateway_transaction_id
string
Gateway transaction ID provided for the payment made to the invoice. This is applicable only if payment_mode is autotransaction.
description
string
Small description of the payment made for the invoice.
date
string
Date on which the invoice is paid.
reference_number
string
Reference number of the invoice for which payment is made.
amount
double
Amount paid for the invoice.
bank_charges
double
Denotes any additional bank charges.
exchange_rate
double
Exchange-Rate for the currency.
autotransaction
object
If the payment mode is achpayment, autotransaction information will be displayed in the autotransaction object. It contains autotransaction_id, payment_gateway, gateway_transaction_id, account_id.
Show Sub-Attributes arrow
autotransaction_id
string
Auto-transaction ID generated for the payment made.
payment_gateway
string
Name of the payment gateway associated with payment.
gateway_transaction_id
string
Gateway transaction ID provided for the payment made to the invoice. This is applicable only if payment_mode is autotransaction.
gateway_error_message
string
Gateway error message for a failed transaction.
account_id
string
Unique ID of the bank account. If you are collecting charge via credit card, use card_id (Card ID of the card associated with the transaction)
currency_code
string
The customer's currency code.
currency_symbol
string
The customer's currency symbol.
created_time
string
Time when the invoice was created.
updated_time
string
Time when the invoice details were last updated.
salesperson_id
string
Unique Id to denote the sales person.
salesperson_name
string
Name of the sales person associated with the invoice for offline payments.
invoice_url
string
Url which corresponds to the invoice.
billing_address
object
Customer's billing address object. It contains street, city, state,zip and country.
Show Sub-Attributes arrow
city
string
Name of the city of the customer's billing address.
state
string
Name of the state of the customer's billing address.
zip
string
Zip code of the customer's billing address.
country
string
Name of the country of the customer's billing address.
fax
string
Customer's fax number.
shipping_address
object
Customer's shipping address object. It contains street, city, state,zip and country.
Show Sub-Attributes arrow
street
string
Name of the street of the customer’s shipping address.
city
string
Name of the city of the customer’s shipping address.
state
string
Name of the state of the customer’s shipping address.
zip
string
Zip code of the customer’s shipping address.
country
string
Country code of the customer’s shipping address.
fax
string
Zip code of the customer’s shipping address.
comments
array
Lists the comments added by the system or by user.
Show Sub-Attributes arrow
comment_id
string
Unique Id to denote the comment fro the particular invoice.
description
Small description about the comment.
commented_by_id
string
Unique Id to denote who has commented.
commented_by
string
It denotes the name of the user who has commented or the system.
comment_type
string
It denotes whether user comment or system comment.
date
Date on which the comment was created.
time
string
Denotes the time at which the comment was created.
operation_type
string
It denotes the type of operation performed on invoice.
transaction_id
string
Unique which denotes the type of transaction.
transaction_type
Small description about the type of transaction.
custom_fields
array
Additional fields for the invoices.
Show Sub-Attributes arrow
index
integer
Index of the custom field. It can hold any value from 1 to 10.
label
string
Label of the Custom Field
value
string
Value of the Custom Field
data_type
string
Data type of the custom field.
can_send_in_mail
Set to true if all the attachments of this invoice can be attached in Invoice Emails.
documents
array
List of files attached to a particular customer.
Show Sub-Attributes arrow
file_name
Name of the attached file.
file_type
Type of the attached file.
file_size
file_size_formatted
document_id
Unique ID of the attached file.
attachment_order
Order of the attached file for a particular customer.

Example

{ "invoice_id": "903000000079426", "number": "INV-384", "status": "paid", "invoice_date": "2016-06-05", "due_date": "2016-06-05", "payment_expected_date": "10-05-2013", "ach_payment_initiated": true, "transaction_type": "renewal", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "invoice_items": [ { "item_id": "7000000079434", "name": "Basic", "description": "Charges for this duration (from 16-April-2016 to 8-June-2016)", "code": "basic-monthly", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 50, "quantity": 1, "discount_amount": 80, "item_total": 400, "tax_id": "903002205046032", "tax_exemption_id": "903002205042099", "tax_exemption_code": "NGO" } ], "coupons": [ { "coupon_code": "THANKSGIVING20", "coupon_name": "Flat 10", "discount_amount": 80 } ], "credits": [ { "creditnote_id": "9030000079876", "creditnotes_number": "CN-26", "credited_date": "2016-06-15", "credited_amount": 15 } ], "total": 370, "payment_made": 370, "balance": 0, "credits_applied": 0, "write_off_amount": 0, "payments": [ { "payment_id": "90300000079467", "payment_mode": "autotransaction", "invoice_payment_id": "90300000079469", "amount_refunded": 50, "gateway_transaction_id": "B10E6E0F31BD", "description": "Payment has been made for the invoice INV-384", "date": "2016-06-05", "reference_number": "INV-384", "amount": 370, "bank_charges": 10, "exchange_rate": 1, "autotransaction": { "autotransaction_id": "9030000079465", "payment_gateway": "payflow_pro", "gateway_transaction_id": "B10E6E0F31BD", "gateway_error_message": "Gateway error message for a failed transaction.", "account_id": "9030000000000361" } } ], "currency_code": "USD", "currency_symbol": "$", "created_time": "2016-06-05T02:15:15-0700", "updated_time": "2016-06-05T02:15:15-0700", "salesperson_id": "90300023000043", "salesperson_name": "Bowman", "invoice_url": "", "billing_address": { "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "shipping_address": { "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "comments": [ { "comment_id": "9030000003133", "description": "Invoice has been marked as void", "commented_by_id": "90300000002099", "commented_by": "Zoho Subscripion", "comment_type": "system", "date": null, "time": "2:50 AM", "operation_type": "Added", "transaction_id": "903000001223", "transaction_type": "invoice" } ], "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "can_send_in_mail": true, "documents": [ { "file_name": "Rental Agreement.pdf", "file_type": "pdf", "file_size": 5447, "file_size_formatted": "5.3 KB", "document_id": "903000005689", "attachment_order": 1 } ] }

Retrieve an invoice

Details of an existing invoice.
oauthscope : ZohoSubscriptions.invoices.READ

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id} -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "invoice": { "invoice_id": "903000000079426", "number": "INV-384", "status": "paid", "invoice_date": "2016-06-05", "due_date": "2016-06-05", "payment_expected_date": "10-05-2013", "ach_payment_initiated": true, "transaction_type": "renewal", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "invoice_items": [ { "item_id": "7000000079434", "name": "Basic", "description": "Charges for this duration (from 16-April-2016 to 8-June-2016)", "code": "basic-monthly", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "price": 50, "quantity": 1, "discount_amount": 80, "item_total": 400, "tax_id": "903002205046032", "tax_exemption_id": "903002205042099", "tax_exemption_code": "NGO" } ], "coupons": [ { "coupon_code": "THANKSGIVING20", "coupon_name": "Flat 10", "discount_amount": 80 } ], "credits": [ { "creditnote_id": "9030000079876", "creditnotes_number": "CN-26", "credited_date": "2016-06-15", "credited_amount": 15 } ], "total": 370, "payment_made": 370, "balance": 0, "credits_applied": 0, "write_off_amount": 0, "payments": [ { "payment_id": "90300000079467", "payment_mode": "autotransaction", "invoice_payment_id": "90300000079469", "amount_refunded": 50, "gateway_transaction_id": "B10E6E0F31BD", "description": "Payment has been made for the invoice INV-384", "date": "2016-06-05", "reference_number": "INV-384", "amount": 370, "bank_charges": 10, "exchange_rate": 1, "autotransaction": { "autotransaction_id": "9030000079465", "payment_gateway": "payflow_pro", "gateway_transaction_id": "B10E6E0F31BD", "gateway_error_message": "Gateway error message for a failed transaction.", "account_id": "9030000000000361" } } ], "currency_code": "USD", "currency_symbol": "$", "created_time": "2016-06-05T02:15:15-0700", "updated_time": "2016-06-05T02:15:15-0700", "salesperson_id": "90300023000043", "salesperson_name": "Bowman", "invoice_url": "", "billing_address": { "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "shipping_address": { "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "comments": [ { "comment_id": "9030000003133", "description": "Invoice has been marked as void", "commented_by_id": "90300000002099", "commented_by": "Zoho Subscripion", "comment_type": "system", "date": null, "time": "2:50 AM", "operation_type": "Added", "transaction_id": "903000001223", "transaction_type": "invoice" } ], "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ], "can_send_in_mail": true, "documents": [ { "file_name": "Rental Agreement.pdf", "file_type": "pdf", "file_size": 5447, "file_size_formatted": "5.3 KB", "document_id": "903000005689", "attachment_order": 1 } ] } }

List all invoices

List of all invoices.

To list invoices for a particular subscription or customer append a param as subscription_id={subscription_id} or customer_id={customer_id}.
oauthscope : ZohoSubscriptions.invoices.READ

Query Parameters

filter_by
Invoices of particular status can be filtered by passing a param filter_by. Allowed values are Status.(All, Sent, Draft, OverDue, Paid, PartiallyPaid, Void, Unpaid).

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "invoices": [ { "invoice_id": "903000000079426", "number": "INV-384", "status": "paid", "invoice_date": "2016-06-05", "due_date": "2016-06-05", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "balance": 0, "total": 370, "currency_code": "USD", "currency_symbol": "$", "has_attachment": true, "created_time": "2016-06-05T02:15:15-0700", "updated_time": "2016-06-05T02:15:15-0700" }, {...}, {...} ] }

Collect charge via bank account / credit card

Charge a customer for an invoice using existing bank account.
oauthscope : ZohoSubscriptions.invoices.CREATE

Arguments

account_id
string
(Required)
Unique ID of the bank account. If you are collecting charge via credit card, use card_id (Card ID of the card associated with the transaction)

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/collect -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "account_id": "9030000000000361" }

Response Example

{ "code": 0, "message": "The customer payment has been recorded.", "payment": { "payment_id": "90300000079467", "payment_mode": "autotransaction", "amount": 370, "amount_refunded": 50, "bank_charges": 10, "date": "2016-06-05", "status": "paid", "reference_number": "INV-384", "due_date": "2016-06-05", "amount_due": 10, "description": "Payment has been made for the invoice INV-384", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "autotransaction": { "autotransaction_id": "9030000079465", "payment_gateway": "payflow_pro", "gateway_transaction_id": "B10E6E0F31BD", "gateway_error_message": "Gateway error message for a failed transaction.", "account_id": "9030000000000361" }, "invoices": [ { "invoice_id": "903000000079426", "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": "string", "label": "string", "data_type": "text" } ], "created_time": "2016-06-05T02:15:15-0700", "updated_time": "2016-06-05T02:15:15-0700" } }

Convert to void

Making an invoice void.
oauthscope : ZohoSubscriptions.invoices.CREATE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/void -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Invoice has been marked as void." }

Convert to open

Change the status of the invoice to open.
oauthscope : ZohoSubscriptions.invoices.CREATE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/converttoopen -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Status of the invoice has been changed to open." }

Email an invoice

Email an invoice.
oauthscope : ZohoSubscriptions.invoices.CREATE

Arguments

to_mail_ids
array
(Required)
The email IDs to which the invoice is to be mailed.
cc_mail_ids
array
The email IDs that have to be copied when the credit note is to be mailed.
subject
string
(Required)
The subject of the email.
body
string
(Required)
The body of the email.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/email -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "to_mail_ids": [ "benjamin.george@bowmanfurniture.com", "paul@bowmanfurniture.com" ], "cc_mail_ids": [ "accounts@bowmanfurniture.com" ], "subject": "Invoice for the subscription.", "body": "Please find attached invoice for your subscription." }

Response Example

{ "code": 0, "message": "Your invoice has been sent." }

Write off

Write off a invoice.
oauthscope : ZohoSubscriptions.invoices.CREATE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/writeoff -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Invoice has been written off.." }

Cancel Write off

Revert write off performed for a invoice.
oauthscope : ZohoSubscriptions.invoices.CREATE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/cancelwriteoff -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "The write off done for this invoice has been cancelled." }

Update address

Update shipping and billing address of an invoice.
oauthscope : ZohoSubscriptions.invoices.UPDATE

Arguments

billing_address
object
Customer's billing address object. It contains street, city, state,zip and country.
Show Sub-Attributes arrow
city
string
Name of the city of the customer's billing address.
state
string
Name of the state of the customer's billing address.
zip
string
Zip code of the customer's billing address.
country
string
Name of the country of the customer's billing address.
fax
string
Customer's fax number.
shipping_address
object
Customer's shipping address object. It contains street, city, state,zip and country.
Show Sub-Attributes arrow
street
string
Name of the street of the customer’s shipping address.
city
string
Name of the city of the customer’s shipping address.
state
string
Name of the state of the customer’s shipping address.
zip
string
Zip code of the customer’s shipping address.
country
string
Country code of the customer’s shipping address.
fax
string
Zip code of the customer’s shipping address.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/address -X PUT -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "billing_address": { "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "shipping_address": { "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 } }

Response Example

{ "code": 0, "message": "Invoice address updated", "invoice_address": { "billing_address": { "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "shipping_address": { "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 } } }

Update Custom Fields

Update the custom fields of an invoice.
oauthscope : ZohoSubscriptions.invoices.CREATE

Arguments

custom_fields
array
(Required)
Additional fields for the invoices.
Show Sub-Attributes arrow
label
string
(Required)
Label of the Custom Field
value
string
(Required)
Value of the Custom Field

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/customfields -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "custom_fields": [ { "label": "string", "value": "string" } ] }

Response Example

{ "code": 0, "message": "Custom Fields Updated Successfully", "custom_fields": [ { "customfield_id": 2000000029001, "show_in_store": false, "is_active": true, "index": 1, "show_in_hp": false, "is_mandatory": true, "label": "Test_field", "is_custom_field": true, "is_mandatory_in_sales_item": false, "is_mandatory_in_hp": false, "edit_on_store": false, "show_in_all_pdf": true, "search_entity": "invoice", "data_type": "string", "pii_type": "non_pii", "placeholder": "cf_test_field", "is_inherited_value": false, "value": "Test_value", "is_dependent_field": false, "max_length": 255, "help_text": "" }, {...}, {...} ] }

Apply Multiple Credits to Invoice

To associate multiple creditnotes to a particular invoice.
oauthscope : ZohoSubscriptions.invoices.CREATE

Arguments

apply_creditnotes
array
(Required)
List of creditnotes applied to the object.
Show Sub-Attributes arrow
creditnote_id
string
(Required)
Unique ID denoting the credit note.
amount_applied
(Required)
Credit amount to be applied to the invoice.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/credits -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "apply_creditnotes": [ { "creditnote_id": "9030000079876", "amount_applied": 450 } ] }

Response Example

{ "code": 0, "message": "Credits have been applied to the invoice(s).", "apply_creditnotes": [ { "creditnotes_invoice_id": "903000000054901", "creditnote_id": "9030000079876", "invoice_id": "903000000079426", "amount_applied": 450, "date": "2016-06-05", "date_formatted": "05 Jun 2016" }, {...}, {...} ] }

Add items to a pending invoice

Editing a pending invoice to add usage charges.
oauthscope : ZohoSubscriptions.invoices.CREATE

Arguments

invoice_items
array
The list of items which are all included in the invoice. Each item object will have item_id, name, code, price, quantity and item_total. description: Small description about the Invoice item. example: "Charges for this duration (from 16-April-2016 to 8-June-2016)"
Show Sub-Attributes arrow
code
Addon code of the addon.
product_id
Product ID of the product to which the addon is associated with.
name
Name for the item.
description
Description for the item.
price
double
Price of the item.
quantity
integer
Required quantity of the chosen item.
tax_id
Unique ID of Tax or Tax Group that must be associated with the item.
tax_exemption_id
Unique Tax Exemption ID if you dont want to associate a tax to the plan.

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/lineitems -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "invoice_items": [ { "code": "UsageAddon", "product_id": "90300000079226", "name": "usage charge", "description": "Usage charges for last month", "price": 10, "quantity": 1, "tax_id": "90300000079226", "tax_exemption_id": "90300000079226" } ] }

Response Example

{ "code": 0, "message": "Invoice information has been updated.", "invoice": { "invoice_id": "903000000079426", "number": "INV-384", "status": "paid", "invoice_date": "2016-06-05", "due_date": "2016-06-05", "payment_expected_date": "10-05-2013", "ach_payment_initiated": true, "transaction_type": "renewal", "customer_id": "903000000000099", "customer_name": "Bowman Furniture", "email": "benjamin.george@bowmanfurniture.com", "invoice_items": [ { "item_id": "7000000079434", "name": "Basic", "description": "Charges for this duration (from 16-April-2016 to 8-June-2016)", "tags": [ { "tag_id": 0, "tag_option_id": 0 } ], "item_custom_fields": [ { "label": "string", "value": "string" } ], "code": "basic-monthly", "price": 50, "quantity": 1, "discount_amount": 80, "item_total": 400, "tax_id": "903002205046032", "product_type": "goods", "hsn_or_sac": "74191010", "tax_exemption_id": "903002205042099", "tax_exemption_code": "NGO" } ], "coupons": [ { "coupon_code": "THANKSGIVING20", "coupon_name": "Flat 10", "discount_amount": 80 } ], "credits": [ { "creditnote_id": "9030000079876", "creditnotes_number": "CN-26", "credited_date": "2016-06-15", "credited_amount": 15 } ], "total": 370, "payment_made": 370, "balance": 0, "credits_applied": 0, "write_off_amount": 0, "payments": [ { "payment_id": "90300000079467", "payment_mode": "autotransaction", "invoice_payment_id": "90300000079469", "gateway_transaction_id": "B10E6E0F31BD", "description": "Payment has been made for the invoice INV-384", "date": "2016-06-05", "reference_number": "INV-384", "amount": 370, "bank_charges": 10, "exchange_rate": 1 } ], "currency_code": "USD", "currency_symbol": "$", "created_time": "2016-06-05T02:15:15-0700", "updated_time": "2016-06-05T02:15:15-0700", "salesperson_id": "90300023000043", "salesperson_name": "Bowman", "invoice_url": "", "billing_address": { "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "shipping_address": { "street": "Harrington Bay Street", "city": "Salt Lake City", "state": "CA", "zip": 92612, "country": "U.S.A", "fax": 4527389 }, "comments": [ { "comment_id": "9030000003133", "description": "Invoice has been marked as void", "commented_by_id": "90300000002099", "commented_by": "Zoho Subscripion", "comment_type": "system", "date": null, "time": "2:50 AM", "operation_type": "Added", "transaction_id": "903000001223", "transaction_type": "invoice" } ], "custom_fields": [ { "index": 1, "label": "string", "value": "string", "data_type": "text" } ] } }

Delete items from a pending invoice

Deleting an item from pending invoice.
oauthscope : ZohoSubscriptions.invoices.DELETE

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/lineitems/{item_id} -X DELETE -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "Invoice information has been updated." }

Add attachment to an invoice

Attach a file to an invoice.
oauthscope : ZohoSubscriptions.invoices.CREATE

Arguments

can_send_in_mail
boolean
True to send the attachment with the invoice when emailed.
attachment
binary
The file to be attached.Allowed Extensions: gif, png, jpeg, jpg, bmp and pdf

Request Example

Click to copy
$ curl https://subscriptions.zoho.com/api/v1/invoices/{invoice_id}/attachment -X POST -H "X-com-zoho-subscriptions-organizationid: 10234695" -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "can_send_in_mail": true, "attachment": "string" }

Response Example

{ "code": 0, "message": "Your file has been successfully attached to the invoice.", "documents": [ { "file_name": "Rental Agreement.pdf", "file_type": "pdf", "file_size": 5447, "file_size_formatted": "5.3 KB", "document_id": "903000005689", "attachment_order": 1 }, {...}, {...} ] }