Praise be to Allaah.
Letters of credit from the bank are subject to further discussion:
If it is completely covered by the customer, there is nothing wrong with the bank taking a fee from the customer, because this comes under the heading of appointing someone to act on one's behalf, and acting on someone's behalf in return for a fee is permissible, just as it is also permissible to do so for free.
If it is not completely covered by the customer, then it is not permissible to pay a fee to the bank in return for it, because this comes under the heading of giving a guarantee, and giving a guarantee is a voluntary act of kindness. The fuqaha' have stated that it is not permissible to charge money for giving a guarantee, because if the guarantor has to pay, this money becomes a debt owed to the guarantor by the person who was given the guarantee; if a fee is taken for that, it becomes like a loan that brings a benefit to the lender, which is forbidden in shareeah.
It is permissible for the bank to charge administrative fees for issuing the letter of credit in the two cases mentioned above, whilst paying attention to the fact that it should not be more than the actual costs if it is not completely covered by the customer.
A statement on letters of credit was issued by the Islamic Fiqh Council, see the text thereof in the answer to question no. 97268
And Allah knows best.