Method name
https://invoice.zoho.com/api/payments/create
Method type
POST
API description
Adds a payment to an invoice.
Parameters to be passed
authtoken, scope, XMLString, apikey
Sample Request
<Payment> <InvoiceID>4000000040027</InvoiceID> <!-- Mandatory --> <Mode>3</Mode> <!-- 1-> Cheque, 2-> Cash, 3 -> Bank Transfer, 4 -> PayPal, 5 -> CreditCard, 6 -> GoogleCheckOut, 7 -> Applied from Credit, 8-> Authorize.Net, 9 -> Bank Remittance --> <Description>Payment made</Description> <Date>2010-04-26</Date> <!-- If not given, todays' date will be taken --> <ExchangeRate>1</ExchangeRate> <!-- If not given, 1 will be set --> <Amount>50</Amount> </Payment>
Sample Response
<Response status="1"> <Payment uri="/api/payments/4000000040027"> <PaymentID>4000000042009</PaymentID> <InvoiceID>4000000040027</InvoiceID> <Mode>3</Mode> <Description>Payment made</Description> <Date>2010-04-26</Date> <ExchangeRate>1.000000</ExchangeRate> <Amount>50</Amount> </Payment> </Response>
Method name
https://invoice.zoho.com/api/payments/update
Method type
POST
API description
Updates a payment made to an invoice.
You can change the values of the following fields of a payment,
- Date
- Mode
- Description
- ExchangeRate
- Amount
Parameters to be passed
authtoken, scope, XMLString, apikey
Sample Request
<Payment> <PaymentID>4000000042009</PaymentID> <Amount>40</Amount> <!-- Editing the payment amount--> </Payment>
Sample Response
<Response status="1"> <Payment uri="/api/payments/4000000040027"> <PaymentID>4000000042009</PaymentID> <InvoiceID>4000000040027</InvoiceID> <Mode>2</Mode> <Description>Payment made</Description> <Date>2010-04-26</Date> <ExchangeRate>1.000000</ExchangeRate> <Amount>40.000</Amount> </Payment> </Response>
Method name
https://invoice.zoho.com/api/payments/delete/<PaymentID>
Method type
POST
API description
Deletes a payment made to an invoice.
Parameters to be passed
authtoken, scope, apikey
Sample Response
<Response status="1">
Method name
https://invoice.zoho.com/api/payments/<InvoiceID>
Method type
GET
API description
View all the payments done for an invoice.
Parameters to be passed
authtoken, scope, apikey
Sample Response
<Response status="1"> <Payments uri="/api/payments/4000000040027"> <Payment> <PaymentID>4000000042005</PaymentID> <InvoiceID>4000000040027</InvoiceID> <Mode>3</Mode> <Description>Payment made</Description> <Date>2010-04-26</Date> <ExchangeRate>1.000000</ExchangeRate> <Amount>50.000</Amount> </Payment> <Payment> <PaymentID>4000000042009</PaymentID> <InvoiceID>4000000040027</InvoiceID> <Mode>3</Mode> <Description>Payment made</Description> <Date>2010-04-26</Date> <ExchangeRate>1.000000</ExchangeRate> <Amount>25.000</Amount> </Payment> </Payments> <PageContext Page="1" Per_Page="200" Total="2" Total_Pages="1"/> </Response>
How to customize the number of invoice payments to be shown on a page?
Method name
https://invoice.zoho.com/api/view/payments/<InvoiceID>
Method type
GET
API description
View all the payments(formatted) done for an invoice.
Parameters to be passed
authtoken, scope, apikey
Sample Response
<Response status="1"> <Payments uri="/api/view/payments/4000000040027"> <Payment> <PaymentID>4000000042005</PaymentID> <InvoiceID>4000000040027</InvoiceID> <Mode>Bank Transfer</Mode> <Description>Payment made</Description> <Date>26 Apr 2010 12:00 AM</Date> <ExchangeRate>1.000000</ExchangeRate> <Amount>Rs. 50.00</Amount> </Payment> <Payment> <PaymentID>4000000042009</PaymentID> <InvoiceID>4000000040027</InvoiceID> <Mode>Bank Transfer</Mode> <Description>Payment made</Description> <Date>26 Apr 2010 03:45 PM</Date> <ExchangeRate>1.000000</ExchangeRate> <Amount>Rs. 25.00</Amount> </Payment> </Payments> <PageContext Page="1" Per_Page="200" Total="2" Total_Pages="1"/> </Response>
How to customize the number of invoice payments to be shown on a page?
Using "PageContext" tag you can customize the number of payments you would like to view per page. Pass "Per_Page" parameter in the request.
<PageContext Page="1" Per_Page="200" Total="2" Total_Pages="1"/>
For navigating to next page, pass "Page" parameter in the request.
In the above example,
| Page | The current page you are viewing. |
| Total_Pages | Total pages present. |
| Per_Page | Number of payments per page (Default value is 200). |
| Total | Total invoices present. |
In Zoho Invoice, the View APIs are of two types - Formatted and Unformatted.
Formatted APIs are used to display the values in the client. The date shown will be formatted based on the date format selected in the settings page. Currency code will be appended to the Invoice Total, balance, Item Total, Price, Payment Amount shown and the amount will also be formatted based on the currency format selected in the Currency settings page.
Unformatted APIs are used for processing values in the program. The date will be shown in the default format "yyyy-MM-dd". The amounts shown will not be formatted.