Is it permissible for a woman to write marriage contracts?
Question

                In our country there are ladies who write marriage contracts. They work as registrars, and as such they write down marriage contracts. I know that one of the conditions for the witnesses and the wali (guardian of the bride) is that they must be male. 

Is it permissible for a woman to write the marriage contract? 

I hope that you can answer my question. Many thanks.
Praise be to Allah.The one who 
    writes down the marriage contract is known as the registrar or by other 
    titles  
This is the 
    one who conducts the marriage procedure in accordance with the essential 
    shar’i requirements, and records it in a document called ‘aqd al-nikaah 
    (the marriage contract). 
One of his 
    duties is to confirm that the bride gives her consent and agrees to this 
    marriage, by consulting a previously-married woman and by asking the 
    permission of a virgin, finding out the conditions stipulated by both 
    parties and ensuring that there are no impediments to the marriage. 
His duties 
    also include confirming whether the wali is acceptable as a wali according 
    to sharee’ah or not, and confirming the identity of the witnesses and 
    recording their testimony.
 His duties 
    also include documenting the nature and amount of the mahr, whether it has 
    been received by the bride or the wali, or not, and whether there remains 
    any of it to be paid at a later date, or it has been paid in full. 
Acting as a 
    registrar is regarded as a branch of the judiciary, in fact the registrar is 
    acting as a deputy of the shar’i judge (qaadi), so the registrar must 
    himself meet some of the conditions that are stipulated for the qaadi, the 
    most important of which are that he should be Muslim, male, an adult, of 
    sound mind and mature. 
It is 
    permissible for a woman to help prepare the marriage contract with regard to 
    the dowry and consent of both parties. But with regard to directly doing the 
    marriage procedure, it is not permissible for her to do that. Concerning 
    this there is a report from ‘Aa’ishah (may Allaah be pleased with her). 
It was 
    narrated that Ibn Jurayj said: When ‘Aa’ishah wanted to arrange the marriage 
    of one of her womenfolk, she called some of her family and would recite the 
    shahaadah, and when there was nothing left but the nikaah, then she would 
    say: “O So and so, perform the marriage, for women cannot perform 
    marriages.” 
Musannaf 
    ‘Abd al-Razzaaq (6/201); classed as saheeh by 
    al-Haafiz Ibn Hajar in Fath al-Baari (9/186). 
It was 
    narrated that ‘Aa’ishah said: If a young man from among her sister’s 
    children liked a young women from among her brother’s children, a curtain 
    would be set up between them and she would speak, and if there was nothing 
    left but marriage she would say: “O so and so, perform the marriage, for 
    women cannot perform marriages.” 
Musannaf 
    Ibn Abi Shaybah (3/276) 
There was 
    also narrated from ‘Aa’ishah a report which may be misinterpreted as meaning 
    that a women is allowed to conduct marriages, and the Hanafis quoted it as 
    evidence that it is not essential to have a wali for marriage. 
It was 
    narrated from al-Qaasim ibn Muhammad that ‘Aa’ishah the wife of the Prophet 
     (peace and blessings of Allaah be upon him) married Hafsah bint ‘Abd 
    al-Rahmaan to al-Mundhir ibn al-Zubayr when ‘Abd al-Rahmaan was away in 
    Syria. When ‘Abd al-Rahmaan came he said: How could such a thing be done to 
    me? How could I be mistreated in such a manner?  ‘Aa’ishah spoke to 
    al-Mundhir ibn al-Zubayr and al-Mundhir said: That is up to ‘Abd al-Rahmaan. 
    ‘Abd al-Rahmaan said: I would not undo something that you have decided. 
    Therefore Hafsah remained married to al-Mundhir and there was no divorce. 
Narrated by 
    Maalik (1182). Its isnaad is saheeh. 
What they 
    understood from this report is wrong. What the report means is in accordance 
    with what we have narrated from ‘Aa’ishah (may Allaah be pleased with her) 
    above. 
Imam Abu 
    Waleed al-Baaji (may Allaah have mercy on him) said: 
The words “ 
    ‘Aa’ishah married Hafsah to…” may be understood in two ways: 
1 – That she 
    herself did the marriage contract. This was narrated by Ibn Muzayn from 
    ‘Eesa ibn Dinar who said: This is not the usual practice – i.e., the 
    practice of the people of Madeenah at the time when ‘Eesa was there – 
    because Maalik and the fuqaha’ of Madeenah did not regard as permissible a 
    marriage contract done by a woman, and it to be regarded it as invalid 
    whether the marriage is consummated or not.  
2 –That she 
    only discussed the mahr and other matters having to do with the marriage, 
    and appointed one of her male relatives to conduct the marriage, but the 
    contract was attributed to ‘Aa’ishah because she is the one who arranged it. 
    It was narrated that ‘Aa’ishah would arrange marriages then say: “Perform 
    the marriage contract, for women cannot perform the marriage contract.” This 
    is what is well known among the Sahaabah, that it is not valid for a woman 
    to perform a marriage contract for herself or for another woman. 

    Al-Muntaqa Sharh al-Muwatta’ (3/251). 
Ibn ‘Abd 
    al-Barr (may Allaah have mercy on him) said: 
The words in 
    this hadeeth – ‘Aa’ishah married Hafsah, the daughter of her brother ‘Abd 
    al-Rahmaan, to al-Mundhir ibn al-Zubayr – are not to be taken at face value. 
    What is meant by the words “she married Hafsah to” is – and Allaah knows 
    best –the proposal of marriage and other arrangements concerning the dowry, 
    consent to marriage and so on, not the marriage contract itself. This is 
    based on the hadeeth that is narrated from her, which says that when she had 
    finished discussing the proposal, dowry and consent to marriage, she would 
    say: “Perform the marriage contract, for women cannot perform the marriage 
    contract.” 
He said: The 
    Kufis quoted as evidence the hadeeth of Maalik from ‘Abd al-Rahmaan ibn 
    al-Qaasim from ‘Aa’ishah that is mentioned in this chapter about it being 
    permissible for a woman to perform a marriage contract. 
But it 
    cannot be evidence because of the hadeeth of Ibn Jurayj that we have quoted, 
    and because ‘Aa’ishah is the last of those who quoted the Prophet  
    (peace and blessings of Allaah be upon him) as saying: “There can be no 
    marriage without a guardian.” The word wali (guardian) can only be applied 
    to male relatives, not women. 

    Al-Istidhkaar (6/32). 
Conclusion: 
It is 
    permissible for a woman to arrange and prepare for a marriage but it is not 
    permissible for her to conduct the marriage herself, because that is the job 
    of the qaadi or his deputy, and one of the conditions of the qaadi is that 
    he should be male. 
If the 
    marriage contract has been performed with the consent of both parties and 
    the agreement of the wali, and the woman is appointed to document the 
    marriage contract, such as if she is an employee working in the court or 
    sharee’ah department, and the like, then it seems that there is nothing 
    wrong with that, because the marriage contract has been done, and all she is 
    doing is recording it in a document. 
But if she 
    is a witness to the marriage contract or is the one who decides the validity 
    of the witnesses or she is the one who conducts the marriage, instead of the 
    wali, then that is not permissible. 
And Allaah 
    knows best.