Get config from magento 2

I want to add a custom payment method from 3rd party. Let say I have it on magento 2 CMS, and it’s ready to use. And I have the SDK for JS to use it on VSF, but it will need same config with the one on magento 2 CMS which is will be redundant (eg. api key, api secret, and other stuff). So the question is, how can I get the config on magento 2 CMS to use JS SDK on VSF?

Thank you in advance.