The legal framework
A custom software contract in Saudi Arabia draws on the Copyright Law (royal decree M/169 of 14/8/1447H) and its Implementing Regulation, which protect computer programs and their applications as works (article 3(11)), and on the Civil Transactions Law (royal decree M/191 of 29/11/1444H), which governs the contract. The Copyright Law replaced the earlier law of 2003 (royal decree M/41) when it took effect, 180 days after its publication in the Official Gazette (articles 59 and 61).
Copyright protects the expression in a program, and does not protect ideas, procedures, working methods or abstract principles (article 4). A client that wants a method, an algorithm or a business process kept exclusive cannot rely on copyright for the idea, so confidentiality and other contract terms have to do that work. The Copyright Law and its Regulation do not set out a model development contract, a warranty period, or a rule on source code escrow. Those points belong to the contract.
The Civil Transactions Law adds the general rules. Under article 94 a valid contract binds the parties and may be changed only by agreement or by a legal text, and under article 95 it must be performed according to its content and in good faith.
Specification, phases and acceptance
The Implementing Regulation (article 22) requires rights holders and businesses working in this field to set their contract relations in written contracts that define the rights and duties, including the work covered, the type of exploitation permitted, its duration and its geographical scope, and the fee or share of revenue and how it is paid. For a development project the written contract is therefore the place to define the specification: the functions, the platforms, the integrations, the documents to be delivered and the standards the work must meet.
Phases need to be written with their deliverables and dates. A common structure is a specification phase, a build phase in stages, a test phase and acceptance. The contract should say who tests, on what criteria, how defects are reported, how long the client has to accept or reject, and what happens to payment on each outcome. The instruments cited do not set acceptance rules, so silence in the contract leaves the point open.
Changes to the specification are a common source of dispute. Under article 94 of the Civil Transactions Law a change needs agreement, so the contract should set a change-request procedure with a price and a time effect for each change.
Who owns the code
Three rules decide ownership, and a contract should address each.
First, the author holds moral rights, and these cannot be assigned or waived. The author may be named as author, may object to a distorting change, and keeps these rights after granting any right of exploitation (Copyright Law article 7). A client that takes over the code can therefore obtain the financial rights, but the contract cannot remove the moral rights.
Second, financial rights pass by a legal disposition (article 10). The Implementing Regulation adds that rights are independent of the physical object that carries the work, so handing over a disk or a repository does not by itself transfer them (article 20(2)). A transfer may be proved by any legally recognised means issued by the parties to the disposition, which is evidence of the transfer unless the contrary is proved (article 20(3)). An assignment of the author's whole future output is void (article 14), so an assignment clause should be limited to the project's deliverables.
Third, the default allocation depends on who wrote the code. Where an employee creates a work related to the employer's activities, the employer holds the author's rights unless agreed otherwise (article 18(1)), and the Regulation treats a work as related where it results from the employee's duties or contractual obligations, was commissioned or directed by the employer, or was made with the employer's resources in a way directly connected to those activities (Regulation article 15(1)). Where the work is created for another person, the position is less clear. Article 18(2) of the Law says the author's financial rights return to the author unless agreed otherwise. Article 15(2) of the Regulation says that where a work is created under a special contract with a person who has no employment relationship with the author, the moral rights are kept by the author and the financial rights go to that person unless the contract expressly says otherwise. Because these two texts are worded differently, a client should not rely on either default. The contract should state the owner of the financial rights in the deliverables expressly, and the scope, duration and territory of any assignment or licence.
Contributions by several people raise further points. Where several authors' contributions cannot be separated they are equal co-owners and none may exercise the rights alone unless agreed otherwise, and where they can be separated each may exploit their own part unless that harms the joint work (article 16). A contract should require the developer to secure written assignments from every employee and subcontractor who writes code for the project.
Licences, open-source components and third-party code
A developer rarely writes every line. Reusable libraries, frameworks, the developer's own pre-existing tools and open-source components usually appear in the delivered product. The contract should list them, state the licence of each, and say whether the client receives ownership, a licence or neither for each category.
Under the Copyright Law, programs, applications and databases are subject to the licence that accompanies them, shown on the media, on download or on installation, and the buyer or user is bound by its terms unless they are contrary to public order or morals (article 12). The Regulation adds that a licence must clearly state the user's rights and duties, in particular its scope, duration, purpose and any material restrictions, and that a term which waives statutory rights or restricts lawful use under the statutory exceptions has no effect (article 29(2) and (3)). It applies whether the software sits on the user's device, is reached through networks or runs as a cloud service (article 29). Open-source licences are licence terms of this kind, so the client should know before acceptance which licences it inherits and what each requires of it.
The author's exclusive rights include translating, adapting or transforming the work into another form (article 9(1)(b)). A client that wants to modify the delivered code, or let another contractor do so, needs the right to do so from the owner of those rights, and the contract should grant it.
Delivery, source code and escrow
The instruments cited do not require a developer to deliver source code. Delivery of source code, build scripts, documentation and credentials is therefore a matter for the contract, which should list what is delivered, in what form, where, and when, and should say whether delivery happens at each phase or only at the end.
The Copyright Law lets the owner of a lawful copy of a program make a new copy without the author's permission for a backup (one copy only), for maintaining the authorised copy or supplying maintenance to a person with a lawful copy where necessary for using the software, for correcting technical errors or studying how it works, for interoperability with another system by a licensed person, and for security testing and fixing vulnerabilities, and the new copy must be destroyed when its purpose ends or the lawful copy's ownership ends (article 33). These rights depend on lawful ownership of a copy, and they do not replace a contractual right to the source code.
Escrow is a contract mechanism. The cited provisions set no rule on it. An escrow clause should name the neutral holder, the materials deposited, how often they are updated, who pays, and the events that release them, such as insolvency or a failure to provide support. The deposit should be verified by building the software from it.
Warranty, fixes and liability
The Copyright Law and its Regulation, in the articles cited, set no warranty period or defect standard for custom software. The contract should define a defect, a warranty period starting at acceptance, the response and fix times by severity, what is covered free of charge, and what is excluded, such as changes made by others.
Remedies between the parties follow the Civil Transactions Law and the contract. Under article 108 the parties may agree that the creditor can rescind when the debtor breaches without a court judgment, but the formal notice is still needed unless the parties expressly waive it, and under article 177 the notice may be given by any means the parties agreed or any legal means. Article 178 allows agreed compensation to be fixed in advance unless the obligation is a sum of money. Under article 179 it is not due if the debtor proves the creditor suffered no harm, the court may reduce it at the debtor's request if it was exaggerated or the obligation was partly performed, and the court may raise it to the amount of the harm at the creditor's request if the harm exceeded it through the debtor's fraud or gross error. Any agreement contrary to article 179 is void. A delay-penalty or service-credit clause should be read against these rules.
Remedies for infringement and registration of a transfer
If someone infringes the rights, the holder who suffers direct harm may sue in the competent court to seize the infringing works and the tools used, to stop the infringement, to recover compensation including the infringer's profits, and to obtain information about others involved (article 51). The Law also provides imprisonment of up to one year or a fine of up to one million riyals, or both, for listed violations, including commercial exploitation of a right without the holders' permission (article 47). An assignee has the exclusive rights that were transferred and may bring the related claims within the scope and duration of the transfer (Regulation article 20(4)).
A transfer of financial rights may be entered in the register on the strength of the document that proves it, and an entry is evidence of the disposition against third parties (Regulation articles 20(3) and 57). The Regulation says a disposition may be registered, which leaves registration optional in the text cited, but a client that owns the code under an assignment may want to register it.
Worked example
Hypothetical: a Jeddah logistics company hires a software house to build a fleet management application. The written contract lists the functions and the deliverables in three phases, each with an acceptance test and a 14-day review period. It states that the company owns the financial rights in the code written for the project from the date of each payment, assigned for all uses, without time limit and for all territories, that the developer has written assignments from every contributor, and that the moral rights stay with the authors as the Law requires. It lists the developer's pre-existing libraries and the open-source components with their licences, grants the company a perpetual licence to the libraries, and requires delivery of source code, build scripts and documentation at each phase. A neutral escrow agent holds a copy of the final release for use if the developer becomes insolvent. A 12-month warranty covers defects against the specification, with fix times by severity.
At phase two the company asks for an extra reporting module. The developer prices it and the parties sign a change request. At the end the company finds that one open-source component's licence requires publishing changes to the component, and it uses the contract's list to see the term before acceptance and decide whether to replace the component. A defect appears in month nine, and the developer fixes it within the severity time. When the developer misses the delivery date for phase three by 20 days, the company applies the agreed delay compensation of a fixed amount per day. The developer argues the company lost nothing because the old system kept running, and under article 179(1) the compensation is not due if the developer proves the company suffered no harm, so the company keeps the delivery records and the cost of the extended parallel running as evidence of harm.
Frequently asked questions
Does the client own the code just because it paid for it?
Not automatically. The author holds the moral rights, which cannot be assigned. The financial rights follow the contract. The Law and the Regulation word the default for a work created for another person differently (Law article 18(2), Regulation article 15(2)), so the contract should state who owns the financial rights and on what terms.
Can the developer keep its own libraries and tools?
Yes, if the contract says so. List them, state the licence the client receives, and keep them outside the assignment so that the assignment covers only the project's deliverables.
Is the developer required to hand over the source code?
Not under the articles cited. The contract must require it and should list what is delivered, when, and in what form.
What about open-source components?
Their licences are licence terms of the kind article 12 of the Law addresses, and the Regulation requires a licence to state its scope, duration, purpose and material restrictions (article 29). List each component and licence in the contract and check them before acceptance.
Is source code escrow required?
No cited provision requires it. It is a contract mechanism that the parties may add. The clause should name the holder, the deposit, its updates, the release events and a verification build.
How long is the warranty?
The articles cited set no warranty period for custom software. The contract sets it, together with the defect definition and the fix times.
Is the delay penalty in my contract always payable?
Not automatically. Under article 179 of the Civil Transactions Law the agreed compensation is not due if the debtor proves the creditor suffered no harm, the court may reduce it if it was exaggerated or the obligation was partly performed, and in a case of the debtor's fraud or gross error the court may raise it to the amount of the harm.