Transit visa to Kazakhstan
A transit visa for Kazakhstan is valid for 5 days. It is date-specific, meaning you cannot enter Kazakhstan before the printed entry date, and you cannot leave after the printed exit date. From the MFA: Single, double, and triple entry transit visas are issued for the period of up to 90 days with a right to stay in Kazakhstan for 5 days on every one-way transit during those 90 days.
The average price for a Kazakhstan transit visa is 20$. When applying for a transit visa at the Kazakh embassy, you will need to show proof of onward travel: a visa, train ticket or plane ticket besides the other visa requirements.
If you are in Kazakhstan on a transit visa, you do not need to register with OVIR.
Kazakh transit visa on arrival
It is possible to obtain a transit visa on arrival. This is only possible at the airports of Almaty and Astana, not at a land border. If you have a long lay-over and would like to visit the city, or if you want to continue by land to one of the neighbouring countries, an onward air or rail ticket and the visa for your next destination is enough. You will need to fill in the Kazakh visa application, attach a passport picture and pay. The price is 25$.