See also the Transaction response object.

This functionality is specific to Braintree Marketplace merchants.

gateway.transaction.holdInEscrow("transaction_id", (err, result) => {

If the transaction can't be found, it will return a notFoundError.

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

transactionId required, String

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