With cancelInvoiceLateFees API, you can cancel a late fee incorrectly applied to an invoice.

APISignature
cancelInvoiceLateFeesstatic List cancelInvoiceLateFees(List inputs)

cancelInvoiceLateFees API accepts Related A/R Transaction ID and  Description as input parameters. This API cancels the late fee and deducts the late fee amount from the Total Due Amount of the Invoice. A Destinated Related A/R Transaction record is created for the canceled late fee. cancelInvoiceLateFees API returns cancelInvoiceLateFeeResult object as a response parameter.


Request: cancelLateFeeInputs

Field

Type

Required?

Description

relatedLateFeeTransactionId

ID

Yes

ID of the Related A/R Transaction record 

descriptionString

Yes

Reason to cancel the late fee.



Response: cancelInvoiceLateFeeResult

Field

Type

Description

isSuccess

Boolean

Value is set as true if the Late Fee is canceled successfully. 

Value is set as false if the API encounters an error.

errorMessageStringIf the API execution false, errorMessage string contains a detailed error message.
invoiceIdIDValue is set as the ID of the invoice for which the late fee was canceled successfully.
cancellationTransactionIdIDValue is set as the ID of the Related A/R Transaction created record the cancellation of late fee
List<CustomClass.CancelInvoiceLateFeeInput> cancelLateFeeInputs = new List<CustomClass.CancelInvoiceLateFeeInput>();

CustomClass.CancelInvoiceLateFeeInput cancelInput1 = new CustomClass.CancelInvoiceLateFeeInput('a5p2v000000dpZ3', 'test description');

cancelLateFeeInputs.add(cancelInput1);

List<CustomClass.CancelInvoiceLateFeeResult> cancelInvoiceLateFeeResult = BillingService.cancelInvoiceLateFees(cancelLateFeeInputs);
CODE