generateInvoicePreview() - Starting in 5.2


This API call can be used to generate a preview for an invoice template. This API call will populate your invoice template with sample data and give you a clear idea of what your invoice will look like when you generate your invoices. This will help make testing your invoice easier going forward. If needed - reference to invoice templates documentation


The application supports trusted mode and i_customer parameter should be supplied in this case.


Parameters are listed as follows:

  • i_invoice_template - Invoice template ID. Integer. Mandatory

Returns:

  • result - OK
  • pdf - base64 encoded PDF
  • XMLRPC fault in case of any error.





validateInvoiceTemplate() - Starting in 5.2


This API call can be used to test or generate a preview for an arbitrary invoice template. This API call will populate your invoice template with sample data and give you a clear idea of what your invoice will look like when you generate your invoices. This will help make testing your invoice easier going forward. If needed - reference to invoice templates documentation


The application supports trusted mode and i_customer parameter should be supplied in this case.


Parameters are listed as follows:

  • template - base64 encoded HTML template. String. Mandatory

  • template_css - base64 CSS for the template. String. Optional.

  • converter_options - additional options for the PDF converter. String. Optional.

  • return_pdf - Boolean. Default false.

Returns:

  • result - OK
  • pdf - base64 encoded PDF (optional)
  • XMLRPC fault in case of any error.





generateInvoice() - Starting in 5.2


This API call can be used to generate an arbitrary invoice.


The application supports trusted mode and i_customer parameter should be supplied in this case.


Parameters are listed as follows:

  • i_account - Integer. Mandatory

  • period_begin - Datetime in UTC. Mandatory.

  • period_end - Datetime in UTC. Mandatory.

  • i_billing_plan - Integer. Optional. Default is the current i_billing_plan of an Account.

Returns:

  • result - OK
  • pdf - base64 encoded PDF
  • XMLRPC fault in case of any error.