These codes are commonly used to identify the banks involved in an international wire transfer. SWIFT Standards, a division of The Society for Worldwide Interbank Financial Telecommunication (SWIFT), handles the registration of these codes. For example, DEUTDEFF500 would direct the payment to an office of Deutsche Bank in Bad Homburg. Why has a BIC Code sometimes 8-digits and sometimes 11-digits ? In that case, let me just show you how and give a shortcut to you instead.

CountryCityBank NameBranchSWIFT
Thailand Bangkok Bank of Ayudhya Public Company Limited Bank of Ayudhya Public Company Limited AYUDTHBKXXX
Thailand Songkhla Bank of Ayudhya Public Company Limited Bank of Ayudhya Public Company Limited AYUDTHB10BS
Thailand Phuket Bank of Ayudhya Public Company Limited Bank of Ayudhya Public Company Limited AYUDTHB10BP