Writing down a debt and appointing witnesses at the time of a transaction
Allah, the Most High, says:
يَا أَيُّهَا الَّذِينَ آمَنُوا إِذَا تَدَايَنتُم بِدَيْنٍ إِلَىٰ أَجَلٍ مُّسَمًّى فَاكْتُبُوهُ ۚ وَلْيَكْتُب بَّيْنَكُمْ كَاتِبٌ بِالْعَدْلِ ۚ وَلَا يَأْبَ كَاتِبٌ أَن يَكْتُبَ كَمَا عَلَّمَهُ اللَّهُ ۚ فَلْيَكْتُبْ وَلْيُمْلِلِ الَّذِي عَلَيْهِ الْحَقُّ وَلْيَتَّقِ اللَّهَ رَبَّهُ وَلَا يَبْخَسْ مِنْهُ شَيْئًا ۚ فَإِن كَانَ الَّذِي عَلَيْهِ الْحَقُّ سَفِيهًا أَوْ ضَعِيفًا أَوْ لَا يَسْتَطِيعُ أَن يُمِلَّ هُوَ فَلْيُمْلِلْ وَلِيُّهُ بِالْعَدْلِ ۚ وَاسْتَشْهِدُوا شَهِيدَيْنِ مِن رِّجَالِكُمْ [Al-Baqarah: 282]
“O you who believe! When you enter into a debt transaction with one another for a fixed term, write it down. And let a scribe write between you with justice. The scribe should not refuse to write as Allah has taught him, so let him write, and let the one who owes the right dictate, and let him fear Allah, his Lord, and not diminish anything from it. But if the one who owes the right is foolish or weak, or is unable to dictate himself, then let his guardian dictate with justice. And call upon two witnesses from among your men.”