This is good news. The cost of a transit visa is acceptable.
Travellers that plan to cross Azerbaijan within a short period of time can apply for transit visas. Transit visas have a validity of 30 days and allow to stay in AZ for up to 5 days and cost just $20 USD for all nationals. This is the cheapest type of visa and would ideally suit those who visit Azerbaijan for just a couple of days. Transit visas are issued only through the embassies/consulates of Azerbaijan abroad. Unlike with other type of visas travelers do not need visa support from Azeri side to be able to apply for transit visas. In rare cases they might ask you in the embassy for the proof of onward travel or for the visa for your next destination after Azerbaijan. Visa validity starts from the date you put in application form as your entry day. from that day you will have a 30 days window period to use your 5 days transit.
However, the problem with transit visas are that they are issued not in every embassy/consulate of Azerbaijan and are mainly limited to the countries neighbouring Azerbaijan. In other words embassies in UK and most EU do not issue transit visas. If that is the case for you, then the only alternative is to apply for tourist visa: either electronic or standard one.
If the transit visa has no notes or stamps about non-stop passage, the bearer has the right to stay in the Republic of Azerbaijan for not longer than five days. 5 day transit visas are $20/40 for single/double entry, are valid for one month from the date of issue. You only need an application form, passport photo and photocopy of your passport to apply for transit visa.