O believers, when you negotiate a debt for a fixed term , draw up an agreement in writing, though better it would be to have a scribe write it faithfully down; and no scribe should refuse to write as God has taught him, and write what the borrower dictates, and have fear of God, his Lord, and not leave out a thing. If the borrower is deficient of mind or infirm, or unable to explain, let the guardian explain judiciously; and have two of your men to act as witnesses; but if two men are not available, then a man and two women you approve, so that in case one of them is confused the other may prompt her. When the witnesses are summoned they should not refuse (to come). But do not neglect to draw up a contract, big or small, with the time fixed for paying back the debt. This is more equitable in the eyes of God, and better as evidence and best for avoiding doubt. But if it is a deal about some merchandise requiring transaction face to face, there is no harm if no (contract is drawn up) in writing. Have witnesses to the deal, (and make sure) that the scribe or the witness is not harmed. If he is, it would surely be sinful on your part. And have fear of God, for God gives you knowledge, and God is aware of everything.
— Quran 2:282