See also the Braintree_Transaction response object.

You can void transactions that have a status of authorized or submitted for settlement. The only required information is the transaction ID. When the transaction is voided, Braintree will perform an authorization reversal, if possible, to remove the pending charge from the customer's card.

$result = Braintree_Transaction::void('the_transaction_id');

If the transaction is successfully voided, the result will return true. Otherwise, check for validation errors.

if ($result->success) {
  # Transaction successfully voided
} else {

If the transaction cannot be found, you'll receive a Braintree_Exception_NotFound exception.

transactionId required, string

The unique transaction identifier. You can only void transactions that have a status of authorized or submitted_for_settlement.

Still Have Questions?

If you can’t find an answer, give us a call at 877.434.2894 or contact our Support team