See how the standard Magento_BraintreeTwo module does it:
Magento_BraintreeTwo
Preliminary reading: How to specify a checkout’s renderer for a payment menthod?