In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Imaam As-Sadi [may Allaah have mercy upon him] said:
What the Sharee’ah brought regarding the legislation of contract documents – by way of which the rights of people are affirmed, prevents denial and removes doubts in relation to affairs such as deposits, guarantees for repayment of loans and sureties, which when the one who owes a right is not able to fulfil it, then the one who is owed refers back to the contract document – is like a witness (or certification) by way of which rights are fulfilled. The various benefits in this affair are apparent – the preservation of rights, expanding mutual dealings, establishing them based on equity and justice, rectification of affairs and integrity. Were it not for the contract documents, the majority of transactions would have been nullified, because they are beneficial for one entrusted with an affair and beneficial – in many well known ways – for the one who owes a right to be fulfilled. (1) See appendix a:
Appendix a: Allaah [The Exalted] said:
يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوٓاْ إِذَا تَدَايَنتُم بِدَيۡنٍ إِلَىٰٓ أَجَلٍ۬ مُّسَمًّ۬ى فَٱڪۡتُبُوهُۚ وَلۡيَكۡتُب بَّيۡنَكُمۡ ڪَاتِبُۢ بِٱلۡعَدۡلِۚ وَلَا يَأۡبَ كَاتِبٌ أَن يَكۡتُبَ ڪَمَا عَلَّمَهُ ٱللَّهُۚ فَلۡيَڪۡتُبۡ وَلۡيُمۡلِلِ ٱلَّذِى عَلَيۡهِ ٱلۡحَقُّ وَلۡيَتَّقِ ٱللَّهَ رَبَّهُ ۥ وَلَا يَبۡخَسۡ مِنۡهُ شَيۡـًٔ۬اۚ فَإِن كَانَ ٱلَّذِى عَلَيۡهِ ٱلۡحَقُّ سَفِيهًا أَوۡ ضَعِيفًا أَوۡ لَا يَسۡتَطِيعُ أَن يُمِلَّ هُوَ فَلۡيُمۡلِلۡ وَلِيُّهُ ۥ بِٱلۡعَدۡلِۚ وَٱسۡتَشۡہِدُواْ شَہِيدَيۡنِ مِن رِّجَالِڪُمۡۖ فَإِن لَّمۡ يَكُونَا رَجُلَيۡنِ فَرَجُلٌ۬ وَٱمۡرَأَتَانِ مِمَّن تَرۡضَوۡنَ مِنَ ٱلشُّہَدَآءِ أَن تَضِلَّ إِحۡدَٮٰهُمَا فَتُذَڪِّرَ إِحۡدَٮٰهُمَا ٱلۡأُخۡرَىٰۚ وَلَا يَأۡبَ ٱلشُّہَدَآءُ إِذَا مَا دُعُواْۚ وَلَا تَسۡـَٔمُوٓاْ أَن تَكۡتُبُوهُ صَغِيرًا أَوۡ ڪَبِيرًا إِلَىٰٓ أَجَلِهِۦۚ ذَٲلِكُمۡ أَقۡسَطُ عِندَ ٱللَّهِ وَأَقۡوَمُ لِلشَّہَـٰدَةِ وَأَدۡنَىٰٓ أَلَّا تَرۡتَابُوٓاْۖ إِلَّآ أَن تَكُونَ تِجَـٰرَةً حَاضِرَةً۬ تُدِيرُونَهَا بَيۡنَڪُمۡ فَلَيۡسَ عَلَيۡكُمۡ جُنَاحٌ أَلَّا تَكۡتُبُوهَاۗ وَأَشۡهِدُوٓاْ إِذَا تَبَايَعۡتُمۡۚ وَلَا يُضَآرَّ كَاتِبٌ۬ وَلَا شَهِيدٌ۬ۚ وَإِن تَفۡعَلُواْ فَإِنَّهُ ۥ فُسُوقُۢ بِڪُمۡۗ وَٱتَّقُواْ ٱللَّهَۖ وَيُعَلِّمُڪُمُ ٱللَّهُۗ وَٱللَّهُ بِڪُلِّ شَىۡءٍ عَلِيمٌ۬
O you who believe! When you contract a debt for a fixed period, write it down. Let a scribe write it down in justice between you. Let not the scribe refuse to write as Allah has taught him, so let him write. Let him (the debtor) who incurs the liability dictate, and he must fear Allah, his Lord, and diminish not anything of what he owes. But if the debtor is of poor understanding, or weak, or is unable himself to dictate, then let his guardian dictate in justice. And get two witnesses out of your own men. And if there are not two men (available), then a man and two women, such as you agree for witnesses, so that if one of them (two women) errs, the other can remind her. And the witnesses should not refuse when they are called on (for evidence). You should not become weary to write it (your contract), whether it be small or big, for its fixed term, that is more just with Allah; more solid as evidence, and more convenient to prevent doubts among yourselves, save when it is a present trade which you carry out on the spot among yourselves, then there is no sin on you if you do not write it down. But take witnesses whenever you make a commercial contract. Let neither scribe nor witness suffer any harm, but if you do (such harm), it would be wickedness in you. So be afraid of Allah; and Allah teaches you. And Allah is the All-Knower of each and everything. [Qur’anic Proofs Which Show that the Religion of Islam Embodies the Beneficial Contemporary Sciences and Professions – By Imaam As-Sadi: https://salaficentre.com/wp-content/uploads/2021/11/Quranic_Proofs_Pdf_final.pdf pages 18-19
[Ref 1: Ad-Durra Al-Mukhtasar Fee Mahaasin Deen Al-Islaamiy page 30-31. slightly paraphrased]