It is narrated from Sayyiduna Samurah bin Jundub (may Allah be pleased with him) that "the Prophet (peace and blessings be upon him) forbade selling an animal for an animal on credit."
However, most of the hadith masters do not affirm that al-Hasan al-Basri heard from Samurah, except in the hadith of the aqiqah. Some jurists interpreted it as selling one for the other with credit on both sides, which would be a debt for a debt, and that is not permissible.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب البيوع / 10532