Loading...

Knowledge Base

Create Credit Notes or Discounts for Invoices via API

When you want to create a credit note or apply a discount to an invoice using the API. This article explains the required parameters, API request format, and response details for discounting invoices.

Discounting an Invoice

Description

Create a credit note or give a discount for a given invoice.

Parameters

NameData TypeRequired / OptionalDescription
auth-useridIntegerRequiredAuthentication Parameter
api-keyStringRequiredAuthentication Parameter
invoice-idIntegerRequiredInvoice id to be discounted
amountFloatRequiredThe amount for which the credit note is issued
transaction-keyStringRequiredA unique Transaction key
roleStringRequiredreseller/customer

HTTP Method

POST

Example Test URL Request

https://test.httpapi.com/api/billing/credit-note.json?auth-userid=0&api-key=0&invoice-id=0&amount=0.0&transaction-key=transaction-key-text&role=customer

Response

Returns 'true' when successful.

In case of any errors, a status key with value as ERROR along with an error message will be returned.