A transit VISA is valid for up to six months although the duration of stay in Serbia per transit cannot exceed five days.
For the issuance of a transit VISA, you should have an entry VISA for the country of destination after passing through Serbia. In case a VISA is not required for that country, you will be asked to present other documents explaining the purpose of your visit there.
If you would like to request this VISA you should start the procedure at least 4 weeks before your trip. These official arrangements take time and the Serbian ministry could request last minute documentation if they believe it is necessary.
You can find more information in the following link, Embassy or Consulate of the Republic of Serbia abroad.
In some cases you might need a transit VISA if you are connecting flights in Serbia as part of your journey. You should confirm with your airline if you need paperwork or not.
It may also happen that certain countries you pass through towards your destination may require a separate transit VISA as well. Make sure you are fully aware of all the documentation needed.