To cancel a paid, authorized, or captured transaction on credit card, you perform a void operation on the relative payment object. Void will prevent moving funds form user card account if hasn’t settled yet in your bank account. Otherwise, it won’t succeed and refund will be needed in this case.
A payment object if the void operation succeeded with voided_at attributes updated.
In case of any failure, returns an error object.
An error example is using void on an unsuccessful authorized payment.