How to load transaction data by id Magento 2?

Loads a specified Payment transaction details by the given id in Magento 2.

Retrieve the transaction details information will be an array of order id, txn_id, payment id, txn_type, and additional_information from theĀ sales_payment_transaction database table.

The sales module has API TransactionRepositoryInterface, use get() method from the interface to fetch transactional data.

Call method with a valid argument,