Cancelling a Customer's Invoice and Debit Note

Description

This call allows you to cancel a customer's invoices or debit notes. It requires a minimum of one invoice id or debit note id

Parameters

Name Data Type Required / Optional Description
auth-userid Integer Required Authentication Parameter
api-key String Required Authentication Parameter
invoice-ids Array Of Integer Required Invoice Ids that are to be settled
debit-ids Array Of Integer Optional Debit Note Ids that are to be settled

HTTP Method

POST

Example Test URL Request

https://test.httpapi.com/api/billing/customer-transactions/cancel.xml?auth-userid=0&api-key=key&invoice-ids=0&invoice-ids=1&debit-ids=0&debit-ids=1

Response

Returns a hash map of the specified Transactions (invoices and / or debit notes) containing the below details:

  • Status (Success or Failed)

  • Error (only when the status is failed)

Returns the below details only in case of an invoice

  • Action Type (actiontype)

  • Description of the Action (actiontypedesc)

  • Order ID of the Invoice (entityid)

  • Action Status (actionstatus)

  • Description of the Action Status (actionstatusdesc)

Example

Request

https://test.httpapi.com/api/billing/customer-transactions/cancel.xml?auth-userid=0&api-key=key&invoice-ids=302789&debit-note-ids=25012

Response

{"25012":{"status":"Success"},"302789":{"actiontypedesc":"Addition of EE1 for 34543564564756.com for 1 month","actionstatus":"Failed","entityid":"574694","status":"Success","actiontype":"Add","description":" 34543564564756.com","actionstatusdesc":"Execution Cancelled"}}