How to set Payment additional data in Magento 2?

Magento 2 You can set additional data in payment using setAdditionalData( ) method defined under Quote Module Payment.php class.

Magento\Quote\Model\Quote\Payment class used for set payment related data from quote to order. This class is used for set payment method, additional data, and other payment-related data to Order.

if you want to add any extra data in payment information you can use setAdditionalData( ) function.

You can create a plugin for Payment class and call before method with setAdditionalData( ) to add extra data.

create file app\code\Rbj\Mymodule\etc\di.xml,

create file app\code\Rbj\Mymodule\Plugin\Payment.php,

Based on the above plugin you can add your custom additional data On Payment related stuff.