This paper examines the optimal bank interest margin for a barrier option model, in which a bank provides vendor financing for a borrowing firm in order to unload its distressed loans. The vendor finance program is tailored by an option that includes the borrowed amount, the discount rate, and swap transaction for unloading distressed loans. We find that the bank interest margin is positively related to the loaned amount, to the discounted rate, and to the swap transaction amount.