If you have authorized an invoice (but not captured yet) then you can call the void() function to cancel the authorization. The function requires no parameters and will only succeed on an invoice whose transaction status is authorized. The void() call returns an updated Transaction object with its
status field set to voided.

Some payment providers support partially voiding an authorization. To do this, pass an amount parameter in the void request. ProcessOut supports using partial voids and partial captures at the same time, as long as the payment provider supports both features.

When using partial voids, transaction status will only be set to voided if the full value of the invoice is voided. In other cases:

  • If there's amount still left for capture after doing a partial void, and nothing has been captured yet, the status will remain as authorized.
  • If the authorized amount has been fully voided, the status will be voided.
  • If a capture (even partial) has been made, the status will be completed.

NOTE: To help with tracking the current state of the invoice when using partial voids, you can use the value of the voided_amount field in the invoice object.