If you will pass through Qatar on your way to a third destination and have a layover that's longer than five hours, then you can apply for a Qatar transit visa. The Qatar transit visa is issued for free, and you can use it to enter and stay in Qatar for up to four days (96 hours).