Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: When the Messenger of Allah (peace and blessings be upon him) passed away, his armor was mortgaged with a Jew in exchange for thirty saa’ of barley.
(Explanation of Hadith 2617) Rahn means to pledge or mortgage, that is, to leave something with someone as security and take a loan from them, and after repaying the loan, to take back one’s item. Just as the Messenger of Allah (sallallahu alayhi wa sallam) bought barley and, in exchange, left his armor as rahn, as is mentioned in [بخاري 2200] and [مسلم 1603].
From this hadith, it is understood that pledging (rahn) is permissible, and taking grain on credit is also permissible. It is also understood that such worldly transactions can be conducted with non-Muslims as well.
The Prophet (sallallahu alayhi wa sallam) took grain on credit from a Jew, and he (sallallahu alayhi wa sallam) was well aware that all kinds of business were conducted among them.