How do websites sell cryptocurrency with fiat payments? I'm trying to create a platform to sell cryptocurrencies in my country. the way it works is, the user enters my website, select a coin he wants to buy then the amount he/she wants to buy, he pays in our common currency (say USD) and we should send him/her the cryptocurrency he has bought. the procedure is like most of the crypto shops, but the question is how should I get cryptos to sell? say a user wants to buy 5 Bitcoins, how should I have 5 Bitcoins to give him? how do other websites do this?
Any help would be appreciated.

Thanks in advance.
Essentially you want to start a cryptocurrency exchange? If that is true, you need liquidity for people to be able to buy these coins. There are two ways of going about it:


Use a broker/third party exchange, such as Kraken.com or any other in your region and have your orderbook go through their's. You would have to price it so you are profitable however.
Prefund your own exchange. For example, you could buy 5BTC and keep it in a wallet designated for your website. So when a customer comes there you have that "cash" flow to sustain orders up to 5BTC. Obviously you would have to scale this up if needed.


I don't know which country you are in but normally this requires a money transmitter license (at least in the USA) for fiat to crypto gateways among others. If your question is referring to the technical/programmatic aspect of the exchange, that's a different answer.