The meaning of Ayat ad-Dayn
The verse begins: "When you contract a debt for a fixed period, write it down." This covers loans and every dealing in which payment comes later, such as buying and selling on credit and Bay' al-Salam (a sale paid in advance for goods delivered later). The term must be fixed so that there is no disagreement later.
Then Allah commands that the scribe write with justice and not refuse to write, and that the one who owes the right dictate, fear Allah and not reduce anything of it. If he is of poor understanding, weak or unable to dictate, then his guardian should dictate with justice. After this comes the command to take two male witnesses, and if two men are not available, then one man and two women, so that if one of them forgets, the other can remind her. When witnesses are called, they should not refuse.
The verse goes on to say: do not grow weary of writing it down, small or large, along with its term; this is more just in the sight of Allah, keeps the testimony more accurate and does more to prevent doubt. But there is no harm in not writing down a cash deal done hand to hand, though you should take witnesses when you buy and sell. Neither the scribe nor the witness should be harmed. At the end Allah says: fear Allah; Allah teaches you, and He knows everything.
Is writing down a debt obligatory or recommended?
In the next verse Allah says: "then if one of you entrusts the other", meaning that if you trust one another, then the one who was trusted should fulfil his trust. When Abu Sa'id al-Khudri (may Allah be pleased with him) recited Ayat ad-Dayn and reached this point, he said that it abrogated the verse before it, meaning that when there is trust, writing is no longer binding. On this basis, most scholars hold that writing down a debt and taking witnesses is a strongly emphasised and recommended command, not an obligation. But in today's conditions, where forgetfulness, death and disputes among heirs are common, writing it down is closer to caution and taqwa (fear of Allah).
Why the command to write and take witnesses?
In a hasan hadith in Sunan al-Tirmidhi (3368), the Prophet ﷺ described the story of Adam (peace be upon him): he gave some years of his life to his son Dawud (peace be upon him), then when the time came he forgot and denied it, and at the end the Prophet ﷺ said that from that day the command to write and take witnesses was given. This makes clear that people forget, and writing and testimony are the cure for this weakness. Abdullah ibn Abbas (may Allah be pleased with them both) also used this verse as proof that a salaf sale (advance payment) for a fixed term is lawful in the Book of Allah.
Key lessons
That the longest verse of the Quran is about financial dealings rather than acts of worship shows how important the rights of people and clean transactions are in Islam. The borrower should dictate himself and not reduce anything, the scribe should write honestly, the witness should not hold back from true testimony, and no one should be harmed. The verse ends with "and fear Allah", meaning that alongside paper and witnesses, the real guarantee is the fear of Allah in the heart.