Use the \Magento\Sales\Model\Order\Payment::setTransactionId() method to set an ID for a transaction and the \Magento\Sales\Model\Order\Payment::setTransactionAdditionalInfo() method to set an additional information to a transaction.
Use the \Magento\Sales\Model\Order\Payment::setTransactionId() method to set an ID for a transaction and the \Magento\Sales\Model\Order\Payment::setTransactionAdditionalInfo() method to set an additional information to a transaction.