See also the Transaction response object.

This functionality is specific to Braintree Marketplace merchants.

result = gateway.transaction.hold_in_escrow("transaction_id")

If the transaction can't be found, it will throw a NotFoundError exception.

You can only hold a transaction in escrow if its status is authorized or submitted_for_settlement.

transaction_id required, str

The id of the transaction you want to hold in escrow.