How to resell web hosting with api


like we resell many services just via api.

example : xyz website provides me 1 month of hosting for 1$

can i make a hosting site and connect the orders to that site anyhow?

i will display the rates as 2$ for its 1$ plan ( for example) i dont have any issue if it uses the cpanel of xyz site.

i just want to keep the middle difference.

any method ? any api? please guide!?