Minecraft Marketplace Minecoins

Hi,
A lot of Bedrock servers I have been to have ranks that you can purchase with Minecoins. How do I do that with my server?

You must have a partnership with Microsoft
Otherwise there is no way for selling ranks with Minecoins.