Void a Posted Invoice (POST)

Void a posted invoice to rebill the customer, if necessary.

This API request changes the invoice status from Posted to Void In Progress. The invoice remains in the Void In Progress status until the credit is applied and financial fields are recalculated on the invoice’s related billing period items and billing schedule. The invoice status changes to Voided after all recalculations are completed.

Keep these considerations in mind when you use this API.

  • The balance and total amount on the invoice must be equal. If these amounts aren’t equal due to payments or credits, the API request fails.
  • You can’t call other APIs on an invoice with the Void In Progress status. You also can’t update the invoice fields.
  • You can void only the most recently posted invoice on a billing schedule.
  • To void an invoice that has payments or credits, use the Credit Memo Unapply (POST) API.

Credit Memos 

The void process creates a credit memo, which contains one credit memo line for each invoice line, including tax lines. For example, if the invoice line has a balance of US$20, the related credit memo line has a balance of $20. The credit memo’s balance is then allocated to the invoice header’s balance, reducing it to zero. A credit memo invoice application is created to record the details of the void process.

Negative Invoice Lines 

If an invoice has negative invoice lines that aren’t converted to a credit memo, you can use this endpoint to void the posted invoice.

Special Access Rules 

You need the Void a Posted Invoice API permission set to use this API.

Resource 

1/commerce/invoicing/invoices/{invoiceId}/actions/void

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/commerce/invoicing/invoices/{3ttxx00000000XtAAI}/actions/void

Available Version 

62.0

HTTP Methods 

POST

Path Parameter for POST 

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
invoiceIdStringID of the posted invoice to be voided.Required62.0

Response Body for POST 

Revenue Async Response